aboutsummaryrefslogtreecommitdiff
path: root/community/chezmoi/build
blob: 02ccd4982b2bb6a047264c83061bacc69a0b72c5 (plain)
1
2
3
4
5
6
7
8
#!/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"