From 4d1b36dc57483db87a3a499258ec0dc579f645f3 Mon Sep 17 00:00:00 2001 From: Thomas Rudin Date: Wed, 27 Mar 2019 14:24:40 +0100 Subject: [PATCH] release script --- .gitignore | 1 + release.sh | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 release.sh diff --git a/.gitignore b/.gitignore index 53752db..16f5c76 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ output +.releasetoken diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..547f687 --- /dev/null +++ b/release.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +VERSION=$1 + +test -z "$VERSION" &&{ + echo "Usage: $0 " + exit 1 +} + + +make clean all + +git tag $VERSION + +export GITHUB_TOKEN=`cat .releasetoken` + +gothub="go run github.com/itchio/gothub" +gothub_release="$gothub release --user thomasrudin-mt --repo mapserver" +gothub_upload="$gothub upload --user thomasrudin-mt --repo mapserver" + +$gothub_release --tag $VERSION --name "Version $VERSION" + +FILES="mapserver-linux-arm mapserver-linux-x86 mapserver-linux-x86_64 mapserver-mod.zip mapserver-windows-x86-64.exe mapserver-windows-x86.exe" + +for file in $FILES +do + $gothub_upload --tag $VERSION --name "$file" --file output/$file +done + +git push --tags + + +