Skip to content

Commit

Permalink
Update nightly release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
zyedidia committed Jul 5, 2020
1 parent 621e4e9 commit cd0a9b6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
17 changes: 3 additions & 14 deletions tools/nightly-release.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
# This script creates the nightly release on Github for micro
# This script updates the nightly release on Github for micro
# Must be run from inside the micro git repository

commitID=$(git rev-parse --short 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

go run remove-nightly-assets.go

# echo "Moving tag"
# hub push origin :refs/tags/nightly
# git tag -f nightly $commitID
# hub push --tags

echo "Cross compiling binaries"
./cross-compile.sh $1
mv ../binaries .

MESSAGE=$'Nightly build\n\nAutogenerated nightly build of micro'

echo "Creating new release"
echo "Updating release"
hub release edit nightly \
--prerelease \
--draft=false \
--message "$MESSAGE. Assets uploaded on $(date) for commit $commitID." \
--message "$MESSAGE (please DISREGARD the creation date of this Github release). Assets uploaded on $(date) for commit $commitID." \
--attach "binaries/micro-$1-osx.tar.gz" \
--attach "binaries/micro-$1-linux64.tar.gz" \
--attach "binaries/micro-$1-linux64-static.tar.gz" \
Expand Down
13 changes: 13 additions & 0 deletions tools/update-nightly-tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
commitID=$(git rev-parse --short HEAD)
echo "Moving tag"
hub push origin :refs/tags/nightly
git tag -f nightly $commitID
hub push --tags

MESSAGE=$'Nightly build\n\nAutogenerated nightly build of micro'

echo "Creating new release"
hub release create nightly \
--prerelease \
--draft=false \
--message "$MESSAGE."

0 comments on commit cd0a9b6

Please sign in to comment.