]> git.lizzy.rs Git - micro.git/blobdiff - tools/nightly-release.sh
Merge pull request #1241 from Danmou/patch-1
[micro.git] / tools / nightly-release.sh
index 8e5e9b91632852983a68b1b02ac1b2660b3c6d34..372027a546d03333a31961c8c8435c0a8dcb1876 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
@@ -23,6 +28,10 @@ github-release release \
     --description "Autogenerated nightly build of micro" \
     --pre-release
 
+echo "Cross compiling binaries"
+./cross-compile.sh $1
+mv ../binaries .
+
 echo "Uploading OSX binary"
 github-release upload \
     --user zyedidia \
@@ -119,18 +128,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