From 6b9e741e1593c2abb6f17bb22796419c960877a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ezequiel=20Fern=C3=A1ndez=20Ponce?= <20102608+ezfepo@users.noreply.github.com> Date: Fri, 8 Jul 2022 17:03:07 -0300 Subject: [PATCH] [CONSUL-189] Support windows consul compile script (#12) --- build-support/docker/Consul-Dev-windows.compile.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 build-support/docker/Consul-Dev-windows.compile.sh diff --git a/build-support/docker/Consul-Dev-windows.compile.sh b/build-support/docker/Consul-Dev-windows.compile.sh new file mode 100644 index 000000000000..3aa6ecddbf64 --- /dev/null +++ b/build-support/docker/Consul-Dev-windows.compile.sh @@ -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/ . \ No newline at end of file