Files
Nik Unger 1365cc1462 Update to latest stable Go toolchain
The latest version of the Go compiler is always the best compiler
for old versions of the language, so this commit upgrades from
1.19 to stable (currently 1.24).

Also added a small comment about the purpose of `./build`
2025-07-23 15:43:18 -04:00

28 lines
711 B
Python
Executable File

#!/bin/bash -e
# Copyright (C) 2016 Square, Inc.
# This script is for use by the Homebrew build toolchain.
# To build or install certigo in most cases, use the standard Go toolchain described in the README.
ORG_PATH="github.com/square"
REPO_PATH="${ORG_PATH}/certigo"
export GOPATH=${PWD}/gopath
rm -f $GOPATH/src/${REPO_PATH}
mkdir -p $GOPATH/src/${ORG_PATH}
ln -s ${PWD} $GOPATH/src/${REPO_PATH}
eval $(go env)
go build -o bin/certigo ${REPO_PATH}
# Generate man page
mkdir -p man
bin/certigo --help-man > man/certigo.1
# Generate completion scripts
mkdir -p shell
bin/certigo --completion-script-zsh > shell/certigo.completion.zsh
bin/certigo --completion-script-bash > shell/certigo.completion.bash