Created
September 13, 2022 00:48
-
-
Save spikeekips/69b86f799205fcb276786f03e592cc8c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
set -x | |
cd ./example | |
go build \ | |
-gcflags=-trimpath=$GOPATH \ | |
-asmflags=-trimpath=$GOPATH \ | |
-trimpath \ | |
-ldflags="-X 'main.Version=v0.0.1' -X 'main.BuildTime=$(TZ=UTC date --iso-8601='seconds')' -X 'main.GitCommit=$(git log --format="%H" -n 1)'" \ | |
-o "$1" \ | |
*.go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment