Add release.sh script that I've been using to build release binaries.
This commit is contained in:
parent
246f726115
commit
6cd93139fd
|
@ -0,0 +1,31 @@
|
||||||
|
#!/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 ../AdGuardHome_"$version"_MacOS.zip
|
||||||
|
zip ../AdGuardHome_"$version"_MacOS.zip AdGuardHome README.md LICENSE.TXT
|
||||||
|
elif [[ $GOOS == windows ]]; then
|
||||||
|
rm -f ../AdGuardHome_"$version"_Windows.zip
|
||||||
|
zip ../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
|
||||||
|
}
|
||||||
|
|
||||||
|
#make clean
|
||||||
|
#make
|
||||||
|
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
|
||||||
|
GOOS=windows GOARCH=amd64 f
|
Loading…
Reference in New Issue