1
1
#! /bin/bash
2
+ #
3
+ # for platform in windows linux macosx; do pushd $platform; ls -l esptool-*; shasum -a 256 esptool-*; popd; done;
4
+ #
5
+ #
2
6
3
7
ver=` git describe --tags`
4
8
outdir=esp8266-$ver
@@ -23,9 +27,14 @@ size=`/bin/ls -l $outdir.zip | awk '{print $5}'`
23
27
echo Size: $size
24
28
echo SHA-256: $sha
25
29
26
- if [ ! -z " $do_upload " ]; then
30
+ if [ " $upload " == " prod " ]; then
27
31
remote=" http://arduino.esp8266.com"
32
+ path=" "
33
+ elif [ " $upload " == " stag" ]; then
34
+ remote=" http://arduino.esp8266.com"
35
+ path=" staging/"
28
36
else
37
+ upload=" "
29
38
remote=" http://localhost:8000"
30
39
fi
31
40
@@ -45,7 +54,7 @@ cat << EOF > package_esp8266com_index.json
45
54
"architecture":"esp8266",
46
55
"version":"$ver ",
47
56
"category":"ESP8266",
48
- "url":"$remote /$outdir .zip",
57
+ "url":"$remote /$path / $ outdir .zip",
49
58
"archiveFileName":"$outdir .zip",
50
59
"checksum":"SHA-256:$sha ",
51
60
"size":"$size ",
@@ -153,9 +162,9 @@ cat << EOF > package_esp8266com_index.json
153
162
}
154
163
EOF
155
164
156
- if [ ! -z " $do_upload " ]; then
157
- scp $outdir .zip dl:apps/download_files/download/
158
- scp package_esp8266com_index.json dl:apps/download_files/download
165
+ if [ ! -z " $upload " ]; then
166
+ scp $outdir .zip dl:apps/download_files/download/$path
167
+ scp package_esp8266com_index.json dl:apps/download_files/download/ $path
159
168
else
160
169
python -m SimpleHTTPServer
161
170
fi
0 commit comments