Skip to content

Commit

Permalink
ci: Fix embedding of build information in binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Acconut committed Sep 15, 2023
1 parent 264fb68 commit bf7fa87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build_funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function compile {
mkdir -p "$dir"
GOOS=$os GOARCH=$arch CGO_ENABLED=0 go build \
-trimpath \
-ldflags="-X github.com/tus/tusd/cmd/tusd/cli.VersionName=${version} -X github.com/tus/tusd/cmd/tusd/cli.GitCommit=${commit} -X 'github.com/tus/tusd/cmd/tusd/cli.BuildDate=$(date --utc)'" \
-ldflags="-X github.com/tus/tusd/v2/cmd/tusd/cli.VersionName=${version} -X github.com/tus/tusd/v2/cmd/tusd/cli.GitCommit=${commit} -X 'github.com/tus/tusd/v2/cmd/tusd/cli.BuildDate=$(date --utc)'" \
-o "$dir/tusd$ext" ./cmd/tusd/main.go
}

Expand Down

0 comments on commit bf7fa87

Please sign in to comment.