Skip to content

Commit

Permalink
add cross compile script
Browse files Browse the repository at this point in the history
  • Loading branch information
khw7096 committed Mar 31, 2019
1 parent 1a8dab2 commit a85846a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin
16 changes: 16 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
APP="git-hours"
# OS별로 빌드함.
GOOS=linux GOARCH=amd64 go build -o ./bin/linux/${APP} git-hours.go
GOOS=windows GOARCH=amd64 go build -o ./bin/windows/${APP}.exe git-hours.go
GOOS=darwin GOARCH=amd64 go build -o ./bin/darwin/${APP} git-hours.go

# Github Release에 업로드 하기위해 압축
cd ./bin/linux/ && tar -zcvf ../${APP}_linux.tgz . && cd -
cd ./bin/windows/ && tar -zcvf ../${APP}_windows.tgz . && cd -
cd ./bin/darwin/ && tar -zcvf ../${APP}_darwin.tgz . && cd -

# 삭제
rm -rf ./bin/linux
rm -rf ./bin/windows
rm -rf ./bin/darwin

0 comments on commit a85846a

Please sign in to comment.