aboutsummaryrefslogtreecommitdiff
path: root/community/chezmoi/build
blob: 3e41b9cec9a1dd9e9bc1d26bab17681060851ecb (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
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'"
clinst -Dm755 chezmoi "$1/usr/bin/chezmoi"