From 244e0ded60d70cef201d67aa478b9ea645954dda Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Fri, 23 Jun 2017 17:26:06 -0400 Subject: [PATCH] Fix ordering of tagging and compiling in release script --- tools/cross-compile.sh | 6 +++--- tools/nightly-release.sh | 35 +++++++++++++++++++---------------- tools/pre-release.sh | 35 +++++++++++++++++++---------------- tools/release.sh | 37 ++++++++++++++++++++----------------- tools/vendor-src.sh | 7 +------ 5 files changed, 62 insertions(+), 58 deletions(-) diff --git a/tools/cross-compile.sh b/tools/cross-compile.sh index 06329d9a..d0b962c3 100755 --- a/tools/cross-compile.sh +++ b/tools/cross-compile.sh @@ -1,13 +1,13 @@ # Source tar -# ./vendor-src.sh micro-$1-src +./vendor-src.sh micro-$1-src cd .. mkdir -p binaries mkdir -p micro-$1 -# mv micro-$1-src.tar.gz binaries -# mv micro-$1-src.zip binaries +mv micro-$1-src.tar.gz binaries +mv micro-$1-src.zip binaries cp LICENSE micro-$1 cp README.md micro-$1 diff --git a/tools/nightly-release.sh b/tools/nightly-release.sh index 8e5e9b91..e5360756 100755 --- a/tools/nightly-release.sh +++ b/tools/nightly-release.sh @@ -1,5 +1,4 @@ # 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 echo "Deleting old release" @@ -23,6 +22,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 +122,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 diff --git a/tools/pre-release.sh b/tools/pre-release.sh index 5861a093..a7219b28 100755 --- a/tools/pre-release.sh +++ b/tools/pre-release.sh @@ -1,5 +1,4 @@ # This script creates releases 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 # $1 is the title, $2 is the description @@ -20,6 +19,10 @@ github-release release \ --description "$2" \ --pre-release +echo "Cross compiling binaries" +./cross-compile.sh $1 +mv ../binaries . + echo "Uploading OSX binary" github-release upload \ --user zyedidia \ @@ -116,18 +119,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 $tag \ -# --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 $tag \ -# --name "micro-$1-src.zip" \ -# --file binaries/micro-$1-src.zip +echo "Uploading vendored tarball" +github-release upload \ + --user zyedidia \ + --repo micro \ + --tag $tag \ + --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 $tag \ + --name "micro-$1-src.zip" \ + --file binaries/micro-$1-src.zip diff --git a/tools/release.sh b/tools/release.sh index 81b5b589..8f39ef6b 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -1,5 +1,4 @@ # This script creates releases 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 # $1 is the title, $2 is the description @@ -19,6 +18,10 @@ github-release release \ --name "$1" \ --description "$2" \ +echo "Cross compiling binaries" +./cross-compile.sh $1 +mv ../binaries . + echo "Uploading OSX binary" github-release upload \ --user zyedidia \ @@ -115,19 +118,19 @@ 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 $tag \ -# --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 $tag \ -# --name "micro-$1-src.zip" \ -# --file binaries/micro-$1-src.zip +echo "Uploading vendored tarball" +github-release upload \ + --user zyedidia \ + --repo micro \ + --tag $tag \ + --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 $tag \ + --name "micro-$1-src.zip" \ + --file binaries/micro-$1-src.zip diff --git a/tools/vendor-src.sh b/tools/vendor-src.sh index fc491231..e7bc0a18 100755 --- a/tools/vendor-src.sh +++ b/tools/vendor-src.sh @@ -1,9 +1,4 @@ -cd ../cmd/micro - -govendor init -govendor add +e - -cd ../../.. +cd ../.. tar czf "$1".tar.gz micro zip -rq "$1".zip micro