From 6cd93139fda79dcdd458a1370bd53660bc790451 Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Fri, 4 Jan 2019 22:12:43 +0300 Subject: [PATCH] Add release.sh script that I've been using to build release binaries. --- release.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 release.sh diff --git a/release.sh b/release.sh new file mode 100755 index 00000000..80df5c8c --- /dev/null +++ b/release.sh @@ -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