Skip to content

Commit f5e2deb

Browse files
committed
Add staging board manager package (#324)
1 parent db0b8be commit f5e2deb

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

build/build_board_manager_package.sh

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/bin/bash
2+
#
3+
# for platform in windows linux macosx; do pushd $platform; ls -l esptool-*; shasum -a 256 esptool-*; popd; done;
4+
#
5+
#
26

37
ver=`git describe --tags`
48
outdir=esp8266-$ver
@@ -23,9 +27,14 @@ size=`/bin/ls -l $outdir.zip | awk '{print $5}'`
2327
echo Size: $size
2428
echo SHA-256: $sha
2529

26-
if [ ! -z "$do_upload" ]; then
30+
if [ "$upload" == "prod" ]; then
2731
remote="http://arduino.esp8266.com"
32+
path=""
33+
elif [ "$upload" == "stag" ]; then
34+
remote="http://arduino.esp8266.com"
35+
path="staging/"
2836
else
37+
upload=""
2938
remote="http://localhost:8000"
3039
fi
3140

@@ -45,7 +54,7 @@ cat << EOF > package_esp8266com_index.json
4554
"architecture":"esp8266",
4655
"version":"$ver",
4756
"category":"ESP8266",
48-
"url":"$remote/$outdir.zip",
57+
"url":"$remote/$path/$outdir.zip",
4958
"archiveFileName":"$outdir.zip",
5059
"checksum":"SHA-256:$sha",
5160
"size":"$size",
@@ -153,9 +162,9 @@ cat << EOF > package_esp8266com_index.json
153162
}
154163
EOF
155164

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
159168
else
160169
python -m SimpleHTTPServer
161170
fi

0 commit comments

Comments
 (0)