Skip to content

Commit

Permalink
[CONSUL-189] Support windows consul compile script (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
ezfepo authored and joselo85 committed Dec 21, 2022
1 parent e93feee commit 6b9e741
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build-support/docker/Consul-Dev-windows.compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
export GOOS=windows GOARCH=amd64

GIT_COMMIT=$(git rev-parse --short HEAD)
GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)
GIT_IMPORT=github.com/hashicorp/consul/version
GIT_DATE=$(../build-support/scripts/build-date.sh)
GOLDFLAGS=" -X $GIT_IMPORT.GitCommit=$GIT_COMMIT$GIT_DIRTY -X $GIT_IMPORT.BuildDate=$GIT_DATE "

go build -ldflags "$GOLDFLAGS" -o ../../dist/ .

0 comments on commit 6b9e741

Please sign in to comment.