2016-06-12 18:05:19 +03:00
|
|
|
# This script creates the nightly release on Github for micro
|
2020-02-16 03:33:49 +03:00
|
|
|
# Must be run from inside the micro git repository
|
2016-06-12 18:05:19 +03:00
|
|
|
|
2018-07-20 03:24:02 +03:00
|
|
|
commitID=$(git rev-parse HEAD)
|
|
|
|
info=$(github-release info -u zyedidia -r micro -t nightly)
|
|
|
|
|
|
|
|
if [[ $info = *$commitID* ]]; then
|
|
|
|
echo "No new commits since last nightly"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-06-12 18:05:19 +03:00
|
|
|
echo "Deleting old release"
|
2020-02-16 03:33:49 +03:00
|
|
|
hub release delete nightly
|
2016-06-12 18:05:19 +03:00
|
|
|
|
|
|
|
echo "Moving tag"
|
2020-02-16 03:33:49 +03:00
|
|
|
hub push origin :refs/tags/nightly
|
|
|
|
git tag -f nightly $commitID
|
|
|
|
hub push --tags
|
2016-06-12 18:05:19 +03:00
|
|
|
|
2020-02-16 03:40:51 +03:00
|
|
|
echo "Cross compiling binaries"
|
|
|
|
./cross-compile.sh $1
|
|
|
|
mv ../binaries .
|
|
|
|
|
2016-06-12 18:05:19 +03:00
|
|
|
echo "Creating new release"
|
2020-02-16 03:33:49 +03:00
|
|
|
hub release create nightly \
|
|
|
|
--prerelease \
|
|
|
|
--message $'Nightly build\n\nAutogenerated nightly build of micro.' \
|
|
|
|
--attach "binaries/micro-$1-osx.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-linux64.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-linux64-static.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-linux32.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-linux-arm.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-linux-arm64.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-freebsd64.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-freebsd32.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-openbsd64.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-openbsd32.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-netbsd64.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-netbsd32.tar.gz" \
|
|
|
|
--attach "binaries/micro-$1-win64.zip" \
|
|
|
|
--attach "binaries/micro-$1-win32.zip"
|