2
0
mirror of https://github.com/elisescu/tty-share synced 2024-11-11 13:10:32 +00:00
tty-share/scripts/release.sh

12 lines
672 B
Bash
Raw Normal View History

2020-01-10 21:22:33 +00:00
set -ev
VERSION=$(git describe --tags `git rev-list --tags --max-count=1` | awk '{print substr($1,2); }')
OUTDIR=out
mkdir -p ${OUTDIR} && \
GOOS=linux GOARCH=arm GOARM=6 go build -mod=vendor -ldflags "-X main.version=${VERSION}" -o ${OUTDIR}/tty-share.rpi && \
GOOS=linux go build -mod=vendor -ldflags "-X main.version=${VERSION}" -o ${OUTDIR}/tty-share.lin && \
GOOS=darwin go build -mod=vendor -ldflags "-X main.version=${VERSION}" -o ${OUTDIR}/tty-share.mac && \
2020-01-10 21:22:33 +00:00
zip ${OUTDIR}/tty-share.rpi.zip ${OUTDIR}/tty-share.rpi && \
zip ${OUTDIR}/tty-share.lin.zip ${OUTDIR}/tty-share.lin && \
zip ${OUTDIR}/tty-share.mac.zip ${OUTDIR}/tty-share.mac