1 # This script creates the nightly release on Github for micro
2 # You must have the correct Github access token to run this script
4 commitID=$(git rev-parse HEAD)
5 info=$(github-release info -u zyedidia -r micro -t nightly)
7 if [[ $info = *$commitID* ]]; then
8 echo "No new commits since last nightly"
12 echo "Deleting old release"
13 github-release delete \
19 git tag --force nightly $commitID
20 git push --force --tags
22 echo "Creating new release"
23 github-release release \
27 --name "Nightly build" \
28 --description "Autogenerated nightly build of micro. If you don't see anything here that probably means it's building right now!" \
31 echo "Cross compiling binaries"
35 echo "Uploading OSX binary"
36 github-release upload \
40 --name "micro-$1-osx.tar.gz" \
41 --file binaries/micro-$1-osx.tar.gz
43 echo "Uploading Linux 64 binary"
44 github-release upload \
48 --name "micro-$1-linux64.tar.gz" \
49 --file binaries/micro-$1-linux64.tar.gz
51 echo "Uploading Linux 64 static binary"
52 github-release upload \
56 --name "micro-$1-linux64-static.tar.gz" \
57 --file binaries/micro-$1-linux64-static.tar.gz
59 echo "Uploading Linux 32 binary"
60 github-release upload \
64 --name "micro-$1-linux32.tar.gz" \
65 --file binaries/micro-$1-linux32.tar.gz
67 echo "Uploading Linux Arm 32 binary"
68 github-release upload \
72 --name "micro-$1-linux-arm.tar.gz" \
73 --file binaries/micro-$1-linux-arm.tar.gz
75 echo "Uploading Linux Arm 64 binary"
76 github-release upload \
80 --name "micro-$1-linux-arm64.tar.gz" \
81 --file binaries/micro-$1-linux-arm64.tar.gz
83 echo "Uploading FreeBSD 64 binary"
84 github-release upload \
88 --name "micro-$1-freebsd64.tar.gz" \
89 --file binaries/micro-$1-freebsd64.tar.gz
91 echo "Uploading FreeBSD 32 binary"
92 github-release upload \
96 --name "micro-$1-freebsd32.tar.gz" \
97 --file binaries/micro-$1-freebsd32.tar.gz
99 echo "Uploading OpenBSD 64 binary"
100 github-release upload \
104 --name "micro-$1-openbsd64.tar.gz" \
105 --file binaries/micro-$1-openbsd64.tar.gz
107 echo "Uploading OpenBSD 32 binary"
108 github-release upload \
112 --name "micro-$1-openbsd32.tar.gz" \
113 --file binaries/micro-$1-openbsd32.tar.gz
115 echo "Uploading NetBSD 64 binary"
116 github-release upload \
120 --name "micro-$1-netbsd64.tar.gz" \
121 --file binaries/micro-$1-netbsd64.tar.gz
123 echo "Uploading NetBSD 32 binary"
124 github-release upload \
128 --name "micro-$1-netbsd32.tar.gz" \
129 --file binaries/micro-$1-netbsd32.tar.gz
131 echo "Uploading Windows 64 binary"
132 github-release upload \
136 --name "micro-$1-win64.zip" \
137 --file binaries/micro-$1-win64.zip
139 echo "Uploading Windows 32 binary"
140 github-release upload \
144 --name "micro-$1-win32.zip" \
145 --file binaries/micro-$1-win32.zip
147 # echo "Uploading vendored tarball"
148 # github-release upload \
152 # --name "micro-$1-src.tar.gz" \
153 # --file binaries/micro-$1-src.tar.gz
155 # echo "Uploading vendored zip"
156 # github-release upload \
160 # --name "micro-$1-src.zip" \
161 # --file binaries/micro-$1-src.zip