]> git.lizzy.rs Git - micro.git/blob - tools/pre-release.sh
Fix incorrect crystal filetype detection
[micro.git] / tools / pre-release.sh
1 # This script creates releases on Github for micro
2 # It assumes that the binaries are in the current directory
3 # You must have the correct Github access token to run this script
4
5 # $1 is the title, $2 is the description
6
7 commitID=$(git rev-parse HEAD)
8 tag="v$1"
9
10 echo "Creating tag"
11 git tag $tag $commitID
12 git push --tags
13
14 echo "Creating new release"
15 github-release release \
16     --user zyedidia \
17     --repo micro \
18     --tag $tag \
19     --name "$1" \
20     --description "$2" \
21     --pre-release
22
23 echo "Uploading OSX binary"
24 github-release upload \
25     --user zyedidia \
26     --repo micro \
27     --tag $tag \
28     --name "micro-$1-osx.tar.gz" \
29     --file binaries/micro-$1-osx.tar.gz
30
31 echo "Uploading Linux 64 binary"
32 github-release upload \
33     --user zyedidia \
34     --repo micro \
35     --tag $tag \
36     --name "micro-$1-linux64.tar.gz" \
37     --file binaries/micro-$1-linux64.tar.gz
38
39 echo "Uploading Linux 32 binary"
40 github-release upload \
41     --user zyedidia \
42     --repo micro \
43     --tag $tag \
44     --name "micro-$1-linux32.tar.gz" \
45     --file binaries/micro-$1-linux32.tar.gz
46
47 echo "Uploading Linux Arm binary"
48 github-release upload \
49     --user zyedidia \
50     --repo micro \
51     --tag $tag \
52     --name "micro-$1-linux-arm.tar.gz" \
53     --file binaries/micro-$1-linux-arm.tar.gz
54
55 echo "Uploading FreeBSD 64 binary"
56 github-release upload \
57     --user zyedidia \
58     --repo micro \
59     --tag $tag \
60     --name "micro-$1-freebsd64.tar.gz" \
61     --file binaries/micro-$1-freebsd64.tar.gz
62
63 echo "Uploading FreeBSD 32 binary"
64 github-release upload \
65     --user zyedidia \
66     --repo micro \
67     --tag $tag \
68     --name "micro-$1-freebsd32.tar.gz" \
69     --file binaries/micro-$1-freebsd32.tar.gz
70
71 echo "Uploading OpenBSD 64 binary"
72 github-release upload \
73     --user zyedidia \
74     --repo micro \
75     --tag $tag \
76     --name "micro-$1-openbsd64.tar.gz" \
77     --file binaries/micro-$1-openbsd64.tar.gz
78
79 echo "Uploading OpenBSD 32 binary"
80 github-release upload \
81     --user zyedidia \
82     --repo micro \
83     --tag $tag \
84     --name "micro-$1-openbsd32.tar.gz" \
85     --file binaries/micro-$1-openbsd32.tar.gz
86
87 echo "Uploading NetBSD 64 binary"
88 github-release upload \
89     --user zyedidia \
90     --repo micro \
91     --tag $tag \
92     --name "micro-$1-netbsd64.tar.gz" \
93     --file binaries/micro-$1-netbsd64.tar.gz
94
95 echo "Uploading NetBSD 32 binary"
96 github-release upload \
97     --user zyedidia \
98     --repo micro \
99     --tag $tag \
100     --name "micro-$1-netbsd32.tar.gz" \
101     --file binaries/micro-$1-netbsd32.tar.gz
102
103 echo "Uploading Windows 64 binary"
104 github-release upload \
105     --user zyedidia \
106     --repo micro \
107     --tag $tag \
108     --name "micro-$1-win64.zip" \
109     --file binaries/micro-$1-win64.zip
110
111 echo "Uploading Windows 32 binary"
112 github-release upload \
113     --user zyedidia \
114     --repo micro \
115     --tag $tag \
116     --name "micro-$1-win32.zip" \
117     --file binaries/micro-$1-win32.zip
118
119 echo "Uploading vendored tarball"
120 github-release upload \
121     --user zyedidia \
122     --repo micro \
123     --tag $tag \
124     --name "micro-$1-src.tar.gz" \
125     --file binaries/micro-$1-src.tar.gz
126
127 echo "Uploading vendored zip"
128 github-release upload \
129     --user zyedidia \
130     --repo micro \
131     --tag $tag \
132     --name "micro-$1-src.zip" \
133     --file binaries/micro-$1-src.zip