File: release.sh

package info (click to toggle)
tty-share 2.2.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,556 kB
  • sloc: javascript: 153; makefile: 20; sh: 10
file content (11 lines) | stat: -rwxr-xr-x 672 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
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 && \
    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