| 1 |
# This script creates releases on Github for micro |
| 2 |
# You must have the correct Github access token to run this script |
| 3 |
|
| 4 |
# $1 is the title, $2 is the description |
| 5 |
|
| 6 |
commitID=$(git rev-parse HEAD) |
| 7 |
tag="v$1" |
| 8 |
|
| 9 |
echo "Creating tag" |
| 10 |
git tag $tag $commitID |
| 11 |
hub push --tags |
| 12 |
|
| 13 |
NL=$'\n' |
| 14 |
|
| 15 |
echo "Cross compiling binaries" |
| 16 |
./cross-compile.sh $1 |
| 17 |
mv ../binaries . |
| 18 |
|
| 19 |
echo "Creating new release" |
| 20 |
hub release create $tag \ |
| 21 |
--message "$1${NL}${NL}$2" \ |
| 22 |
--attach "binaries/micro-$1-osx.tar.gz" \ |
| 23 |
--attach "binaries/micro-$1-macos-arm64.tar.gz" \ |
| 24 |
--attach "binaries/micro-$1-linux64.tar.gz" \ |
| 25 |
--attach "binaries/micro-$1-linux64-static.tar.gz" \ |
| 26 |
--attach "binaries/micro-$1-amd64.deb" \ |
| 27 |
--attach "binaries/micro-$1-linux32.tar.gz" \ |
| 28 |
--attach "binaries/micro-$1-linux-arm.tar.gz" \ |
| 29 |
--attach "binaries/micro-$1-linux-arm64.tar.gz" \ |
| 30 |
--attach "binaries/micro-$1-freebsd64.tar.gz" \ |
| 31 |
--attach "binaries/micro-$1-freebsd32.tar.gz" \ |
| 32 |
--attach "binaries/micro-$1-openbsd64.tar.gz" \ |
| 33 |
--attach "binaries/micro-$1-openbsd32.tar.gz" \ |
| 34 |
--attach "binaries/micro-$1-netbsd64.tar.gz" \ |
| 35 |
--attach "binaries/micro-$1-netbsd32.tar.gz" \ |
| 36 |
--attach "binaries/micro-$1-win64.zip" \ |
| 37 |
--attach "binaries/micro-$1-win32.zip" |