]> git.lizzy.rs Git - micro.git/commitdiff
Update nightly release scripts
authorZachary Yedidia <zyedidia@gmail.com>
Sun, 5 Jul 2020 21:12:06 +0000 (17:12 -0400)
committerZachary Yedidia <zyedidia@gmail.com>
Sun, 5 Jul 2020 21:12:06 +0000 (17:12 -0400)
tools/nightly-release.sh
tools/update-nightly-tag.sh [new file with mode: 0755]

index cb52b43e49c87e3385bf5bfe33cb7629033e095f..205744cc7b7728f5881598e8b50096bb472fa2c9 100755 (executable)
@@ -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" \
diff --git a/tools/update-nightly-tag.sh b/tools/update-nightly-tag.sh
new file mode 100755 (executable)
index 0000000..c59d0e4
--- /dev/null
@@ -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."