]> git.lizzy.rs Git - micro.git/blobdiff - tools/nightly-release.sh
Fetch tags if none are found
[micro.git] / tools / nightly-release.sh
index 89910de2a3756e5d18a5e45833b52daded1c446a..02423ad552175df178f8e496fa31f5a8676de475 100755 (executable)
@@ -1,15 +1,20 @@
 # This script creates the nightly release on Github for micro
-# It assumes that the binaries are in the current directory
 # You must have the correct Github access token to run this script
 
+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
+
 echo "Deleting old release"
 github-release delete \
     --user zyedidia \
     --repo micro \
     --tag nightly
 
-commitID=$(git rev-parse HEAD)
-
 echo "Moving tag"
 git tag --force nightly $commitID
 git push --force --tags
@@ -20,9 +25,13 @@ github-release release \
     --repo micro \
     --tag nightly \
     --name "Nightly build" \
-    --description "Autogenerated nightly build of micro" \
+    --description "Autogenerated nightly build of micro. If you don't see anything here that probably means it's building right now!" \
     --pre-release
 
+echo "Cross compiling binaries"
+./cross-compile.sh $1
+mv ../binaries .
+
 echo "Uploading OSX binary"
 github-release upload \
     --user zyedidia \
@@ -39,6 +48,14 @@ github-release upload \
     --name "micro-$1-linux64.tar.gz" \
     --file binaries/micro-$1-linux64.tar.gz
 
+echo "Uploading Linux 64 static binary"
+github-release upload \
+    --user zyedidia \
+    --repo micro \
+    --tag nightly \
+    --name "micro-$1-linux64-static.tar.gz" \
+    --file binaries/micro-$1-linux64-static.tar.gz
+
 echo "Uploading Linux 32 binary"
 github-release upload \
     --user zyedidia \
@@ -47,7 +64,7 @@ github-release upload \
     --name "micro-$1-linux32.tar.gz" \
     --file binaries/micro-$1-linux32.tar.gz
 
-echo "Uploading Linux Arm binary"
+echo "Uploading Linux Arm 32 binary"
 github-release upload \
     --user zyedidia \
     --repo micro \
@@ -55,6 +72,14 @@ github-release upload \
     --name "micro-$1-linux-arm.tar.gz" \
     --file binaries/micro-$1-linux-arm.tar.gz
 
+echo "Uploading Linux Arm 64 binary"
+github-release upload \
+    --user zyedidia \
+    --repo micro \
+    --tag nightly \
+    --name "micro-$1-linux-arm64.tar.gz" \
+    --file binaries/micro-$1-linux-arm64.tar.gz
+
 echo "Uploading FreeBSD 64 binary"
 github-release upload \
     --user zyedidia \
@@ -119,18 +144,18 @@ github-release upload \
     --name "micro-$1-win32.zip" \
     --file binaries/micro-$1-win32.zip
 
-echo "Uploading vendored tarball"
-github-release upload \
-    --user zyedidia \
-    --repo micro \
-    --tag nightly \
-    --name "micro-$1-src.tar.gz" \
-    --file binaries/micro-$1-src.tar.gz
-
-echo "Uploading vendored zip"
-github-release upload \
-    --user zyedidia \
-    --repo micro \
-    --tag nightly \
-    --name "micro-$1-src.zip" \
-    --file binaries/micro-$1-src.zip
+echo "Uploading vendored tarball"
+github-release upload \
+    --user zyedidia \
+    --repo micro \
+    --tag nightly \
+    --name "micro-$1-src.tar.gz" \
+    --file binaries/micro-$1-src.tar.gz
+#
+echo "Uploading vendored zip"
+github-release upload \
+    --user zyedidia \
+    --repo micro \
+    --tag nightly \
+    --name "micro-$1-src.zip" \
+    --file binaries/micro-$1-src.zip