1#!/bin/sh -e
2
3export GOPATH="$PWD/go"
4export GO111MODULE=on
5export GOPROXY=https://proxy.golang.org
6export CGO_ENABLED=0
7
8go build -a -ldflags="-w -s -extldflags '-static'"\
9 -modcacherw \
10 -trimpath \
11 -buildvcs=false \
12 ./cmd/gh
13
14install -Dm755 gh "$1/usr/bin/gh"