Skip to content

Commit

Permalink
Change build script to reduce size of binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
domain80 committed Jun 24, 2023
1 parent c46d234 commit 9435f2d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# windows
# 32-bit
GOOS=windows GOARCH=386 go build -o dist/windows/swift-386.exe main.go
GOOS=windows GOARCH=386 go build -ldflags="-w -s" -gcflags=all=-l -o dist/windows/swift-386.exe main.go
7z a -tzip ./dist/windows/swift-386-windows.zip ./dist/windows/swift-386.exe ./ui

# 64-bit
GOOS=windows GOARCH=amd64 go build -o dist/windows/swift-amd64.exe main.go
GOOS=windows GOARCH=amd64 go build -ldflags="-w -s" -gcflags=all=-l -o dist/windows/swift-amd64.exe main.go
7z a -tzip ./dist/windows/swift-amd64-windows.zip ./dist/windows/swift-amd64.exe ./ui

# macos
# 64-bit
GOOS=darwin GOARCH=amd64 go build -o dist/macos/swift-amd64-darwin main.go
GOOS=darwin GOARCH=amd64 go build -ldflags="-w -s" -gcflags=all=-l -o dist/macos/swift-amd64-darwin main.go
7z a -tzip ./dist/macos/swift-amd64-darwin.zip ./dist/macos/swift-amd64-darwin ./ui

# # linux
# # 64-bit
GOOS=linux GOARCH=amd64 go build -o dist/linux/swift-amd64-linux main.go
GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -gcflags=all=-l -o dist/linux/swift-amd64-linux main.go
7z a -tzip ./dist/linux/swift-amd64-linux.zip ./dist/linux/swift-amd64-linux ./ui

# # 32-bit
GOOS=linux GOARCH=386 go build -o dist/linux/swift-386-linux main.go
GOOS=linux GOARCH=386 go build -ldflags="-w -s" -gcflags=all=-l -o dist/linux/swift-386-linux main.go
7z a -tzip ./dist/linux/swift-386-linux.zip ./dist/linux/swift-386-linux ./ui

rm ./dist/linux/swift-386-linux
Expand Down
Binary file modified dist/linux/swift-386-linux.zip
Binary file not shown.
Binary file modified dist/linux/swift-amd64-linux.zip
Binary file not shown.
Binary file modified dist/macos/swift-amd64-darwin.zip
Binary file not shown.
Binary file modified dist/windows/swift-386-windows.zip
Binary file not shown.
Binary file modified dist/windows/swift-amd64-windows.zip
Binary file not shown.

0 comments on commit 9435f2d

Please sign in to comment.