aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcommunity/chezmoi/build4
1 files changed, 3 insertions, 1 deletions
diff --git a/community/chezmoi/build b/community/chezmoi/build
index 3e41b9ce..c42675ae 100755
--- a/community/chezmoi/build
+++ b/community/chezmoi/build
@@ -1,7 +1,9 @@
#!/bin/sh -e
-export GOPATH=$PWD/gopath
+export GOPATH="$PWD/gopath"
+
trap "go clean -modcache" EXIT INT
+
go mod vendor
date=$(date -u +%Y-%m-%dT%H:%M:%SZ)
CGO_ENABLED=0 go build -ldflags="-X 'main.version=$2' -X 'main.commit=null' -X 'main.builtBy=cpt' -X 'main.date=$date'"