aboutsummaryrefslogtreecommitdiffstats
path: root/release.sh
blob: 81bbc3bed5c90abf5f935600269f95a1b47261f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
version=$(git describe --tags --abbrev=0)

gooses=(darwin linux windows)
goarches=(amd64 arm64)

if [ ! -d bin ]; then
	mkdir bin
fi

for goos in "${gooses[@]}"; do
	for goarch in "${goarches[@]}"; do
		file="hose_${version}_${goos}_${goarch}"
		if [ "$goos" = "windows" ]; then
			file="$file.exe"
		fi
		echo $file
		GOOS=$goos GOARCH=$goarch go build -o "bin/$file"
	done
done

echo done