badguardhome/release.sh

33 lines
867 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -eE
set -o pipefail
set -x
version=`git describe --abbrev=4 --dirty --always --tags`
f() {
make cleanfast; CGO_DISABLED=1 make
if [[ $GOOS == darwin ]]; then
rm -f dist/AdGuardHome_"$version"_MacOS.zip
2019-01-25 19:12:48 +00:00
zip dist/AdGuardHome_"$version"_MacOS.zip AdGuardHome README.md LICENSE.txt
elif [[ $GOOS == windows ]]; then
rm -f dist/AdGuardHome_"$version"_Windows.zip
2019-01-25 19:12:48 +00:00
zip dist/AdGuardHome_"$version"_Windows.zip AdGuardHome.exe README.md LICENSE.txt
else
pushd ..
tar zcvf AdGuardHome_"$version"_"$GOOS"_"$GOARCH".tar.gz AdGuardHome/{AdGuardHome,LICENSE.txt,README.md}
popd
fi
}
2019-01-25 19:12:48 +00:00
# Prepare the dist folder
mkdir -p dist
# Prepare releases
GOOS=darwin GOARCH=amd64 f
GOOS=linux GOARCH=amd64 f
GOOS=linux GOARCH=386 f
GOOS=linux GOARCH=arm GOARM=6 f
GOOS=linux GOARCH=arm64 GOARM=6 f
2019-01-25 19:12:48 +00:00
GOOS=windows GOARCH=amd64 f