Skip to content

Commit

Permalink
[dev] add cross build
Browse files Browse the repository at this point in the history
  • Loading branch information
nanmu42 committed Sep 11, 2018
1 parent 768a72a commit 432bc1f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*.dylib
*.abi
*.bin
/cmd/issueToken/issueToken
/cmd/issueToken/issueToken*

# IDEs
/.idea
Expand Down
2 changes: 1 addition & 1 deletion cmd/issueToken/cross_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ BUILD=`date +%FT%T%z`

xgo \
--targets=windows/386,windows/amd64,darwin/386,darwin/amd64,linux/386,linux/amd64 \
-ldflags "-s -w -X github.com/dabankio/TokenIssuer/cmd/issueToken.Version=$VERSION -X github.com/dabankio/TokenIssuer/cmd/issueToken.BuildDate=$BUILD" \
-ldflags "-s -w -X main.Version=$VERSION -X main.BuildDate=$BUILD" \
./
2 changes: 1 addition & 1 deletion cmd/issueToken/native_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
VERSION=`git describe --tags --dirty`
BUILD=`date +%FT%T%z`

go build -ldflags "-s -w -X github.com/dabankio/TokenIssuer/cmd/issueToken.Version=$VERSION -X github.com/dabankio/TokenIssuer/cmd/issueToken.BuildDate=$BUILD"
go build -ldflags "-s -w -X main.Version=$VERSION -X main.BuildDate=$BUILD"

0 comments on commit 432bc1f

Please sign in to comment.