Skip to content

Commit

Permalink
refactore build script
Browse files Browse the repository at this point in the history
  • Loading branch information
domain80 committed Jun 24, 2023
1 parent de378ec commit c46d234
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 12 deletions.
Binary file removed bin/linux/swift-386-linux
Binary file not shown.
Binary file removed bin/linux/swift-amd64-linux
Binary file not shown.
Binary file removed bin/macos/swift-amd64-darwin
Binary file not shown.
Binary file removed bin/windows/swift-386.exe
Binary file not shown.
Binary file removed bin/windows/swift-amd64.exe
Binary file not shown.
30 changes: 18 additions & 12 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# windows
# 32-bit
GOOS=windows GOARCH=386 go build -x -o bin/windows/swift-386.exe main.go
GOOS=windows GOARCH=386 go build -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 -x -o bin/windows/swift-amd64.exe main.go

GOOS=windows GOARCH=amd64 go build -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 -x -o bin/macos/swift-amd64-darwin main.go
GOOS=darwin GOARCH=amd64 go build -o dist/macos/swift-amd64-darwin main.go
7z a -tzip ./dist/macos/swift-amd64-darwin.zip ./dist/macos/swift-amd64-darwin ./ui

# 32-bit
# GOOS=darwin GOARCH=386 go build -x -o bin/macos/swift-386-darwin main.go
# # linux
# # 64-bit
GOOS=linux GOARCH=amd64 go build -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
7z a -tzip ./dist/linux/swift-386-linux.zip ./dist/linux/swift-386-linux ./ui

# linux
# 64-bit
GOOS=linux GOARCH=amd64 go build -x -o bin/linux/swift-amd64-linux main.go

# 32-bit
GOOS=linux GOARCH=386 go build -x -o bin/linux/swift-386-linux main.go
rm ./dist/linux/swift-386-linux
rm ./dist/linux/swift-amd64-linux
rm ./dist/macos/swift-amd64-darwin
rm ./dist/windows/swift-386.exe
rm ./dist/windows/swift-amd64.exe
Binary file added dist/linux/swift-386-linux.zip
Binary file not shown.
Binary file added dist/linux/swift-amd64-linux.zip
Binary file not shown.
Binary file added dist/macos/swift-amd64-darwin.zip
Binary file not shown.
Binary file added dist/windows/swift-386-windows.zip
Binary file not shown.
Binary file added dist/windows/swift-amd64-windows.zip
Binary file not shown.

0 comments on commit c46d234

Please sign in to comment.