5if [[ -z ${BINARY} ]] || [[ -z ${VERSION} ]]; then
6 echo "Missing required env var: BINARY=X VERSION=X $(basename $0)"
10ARCHS=(darwin-amd64 linux-amd64 linux-arm64 linux-armv6 freebsd-amd64 windows-amd64)
14# Create architecture specific release dirs
15for ARCH in "${ARCHS[@]}"; do
16 mkdir -p release/${BINARY}-${VERSION}.${ARCH}
18 GO_OS=$(echo $ARCH | awk -F- '{print $1}')
19 GO_ARCH=$(echo $ARCH | awk -F- '{print $2}')
21 # Create architecture specific binaries
22 if [[ ${GO_ARCH} == "armv6" ]]; then
23 GO111MODULE=on GOOS=${GO_OS} GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -ldflags="-X main.VERSION=${VERSION}" \
24 -o release/${BINARY}-${VERSION}.${ARCH}/${BINARY} .
26 GO111MODULE=on GOOS=${GO_OS} GOARCH=${GO_ARCH} CGO_ENABLED=0 go build -ldflags="-X main.VERSION=${VERSION}" \
27 -o release/${BINARY}-${VERSION}.${ARCH}/${BINARY} .
32 # Create sha256sum for architecture specific binary
33 sha256sum ${BINARY}-${VERSION}.${ARCH}/${BINARY} > ${BINARY}-${VERSION}.${ARCH}-sha256sum.txt
35 # Create tar file for architecture specific binary
36 tar -czvf ${BINARY}-${VERSION}.${ARCH}.tar.gz ${BINARY}-${VERSION}.${ARCH}
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list