diff --git a/script/binary b/script/binary index 3d11c20d..9fabf1af 100755 --- a/script/binary +++ b/script/binary @@ -13,6 +13,8 @@ else OS_ARCH_ARG=($2) fi +GITCOMMIT=$(git rev-parse --short HEAD) + # Get rid of existing binaries rm -f kompose* @@ -20,5 +22,5 @@ rm -f kompose* gox "${OS_PLATFORM_ARG[@]}" "${OS_ARCH_ARG[@]}" \ -output="bundles/kompose_{{.OS}}-{{.Arch}}/kompose" \ -tags experimental \ + -ldflags="-w -X github.com/skippbox/kompose/version.GITCOMMIT=${GITCOMMIT}" \ ./cli/main -