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