go build -o build/agnosticv
For releases, use gox to build all target archs:
$ VERSION=... $ gox --output="build/agnosticv_{{.OS}}_{{.Arch}}" -ldflags="-X 'main.Version=${VERSION}' -X 'main.buildTime=$(date -u)' -X 'main.buildCommit=$(git rev-parse HEAD)'" Number of parallel builds: 7 --> darwin/amd64: github.com/redhat-cop/agnosticv/cli --> linux/mipsle: github.com/redhat-cop/agnosticv/cli --> linux/386: github.com/redhat-cop/agnosticv/cli --> darwin/386: github.com/redhat-cop/agnosticv/cli --> netbsd/arm: github.com/redhat-cop/agnosticv/cli --> netbsd/386: github.com/redhat-cop/agnosticv/cli --> windows/amd64: github.com/redhat-cop/agnosticv/cli --> linux/mips64: github.com/redhat-cop/agnosticv/cli --> linux/s390x: github.com/redhat-cop/agnosticv/cli --> linux/mips64le: github.com/redhat-cop/agnosticv/cli --> freebsd/amd64: github.com/redhat-cop/agnosticv/cli --> linux/amd64: github.com/redhat-cop/agnosticv/cli --> linux/arm: github.com/redhat-cop/agnosticv/cli --> freebsd/386: github.com/redhat-cop/agnosticv/cli --> openbsd/amd64: github.com/redhat-cop/agnosticv/cli --> openbsd/386: github.com/redhat-cop/agnosticv/cli --> freebsd/arm: github.com/redhat-cop/agnosticv/cli --> linux/mips: github.com/redhat-cop/agnosticv/cli --> windows/386: github.com/redhat-cop/agnosticv/cli --> netbsd/amd64: github.com/redhat-cop/agnosticv/cli
For Mach ARM:
env GOOS=darwin GOARCH=arm64 go build -ldflags="-X 'main.Version=${VERSION}' -X 'main.buildTime=$(date -u)' -X 'main.buildCommit=$(git rev-parse HEAD)'" -o build/agnosticv_darwin_arm64
Then attach the binaries to the release in github.