aboutsummaryrefslogtreecommitdiff
path: root/community/chezmoi/build
diff options
context:
space:
mode:
Diffstat (limited to 'community/chezmoi/build')
-rwxr-xr-xcommunity/chezmoi/build9
1 files changed, 3 insertions, 6 deletions
diff --git a/community/chezmoi/build b/community/chezmoi/build
index 02ccd498..b395342c 100755
--- a/community/chezmoi/build
+++ b/community/chezmoi/build
@@ -1,8 +1,5 @@
#!/bin/sh -e
-export GOPATH=$PWD/gopath
-trap "go clean -modcache" EXIT INT
-go mod vendor
-
-CGO_ENABLED=0 go build -ldflags="-X 'main.version=$2'"
-install -Dm755 chezmoi "$1/usr/bin/chezmoi"
+date=$(date -u +%Y-%m-%dT%H:%M:%SZ)
+CGO_ENABLED=0 go build -v -mod=vendor -ldflags="-X 'main.version=$2' -X 'main.commit=null' -X 'main.builtBy=cpt' -X 'main.date=$date'"
+clinst -Dm755 chezmoi "$1/usr/bin/chezmoi"