]> code.octet-stream.net Git - broadcaster/blob - buildscripts/init.sh
Bump to v1.2.0
[broadcaster] / buildscripts / init.sh
1 #!/bin/bash
2 set -euxo pipefail
3 cd "$(git rev-parse --show-toplevel)"
4
5 PLATFORM=$1
6
7 case $PLATFORM in
8 mac-x86_64)
9 GOOS=darwin
10 GOARCH=amd64
11 ;;
12 mac-arm64)
13 GOOS=darwin
14 GOARCH=arm64
15 ;;
16 linux-x86_64)
17 GOOS=linux
18 GOARCH=amd64
19 ;;
20 linux-armhf)
21 GOOS=linux
22 GOARCH=arm
23 ;;
24 linux-arm64)
25 GOOS=linux
26 GOARCH=arm64
27 ;;
28 windows-x86_64)
29 GOOS=windows
30 GOARCH=amd64
31 ;;
32 *)
33 echo "Unrecognised platform"
34 exit 1
35 ;;
36 esac
37
38 export PLATFORM
39 export GOOS
40 export GOARCH