|
1 | 1 | #!/bin/bash |
2 | | -# |
3 | 2 |
|
4 | 3 | #set -x |
5 | 4 |
|
6 | 5 | ver=`git describe --tag` |
7 | 6 | visiblever=$ver |
8 | | -if ["$ver"= 0.0.1 ];then |
| 7 | +# match 0.0.* |
| 8 | +if ["${ver%.*}"= 0.0 ];then |
9 | 9 |
|
10 | | - git tag -d0.0.1 |
| 10 | + git tag -d${ver} |
11 | 11 | ver=`git describe --tag HEAD` |
12 | 12 | plain_ver=$ver |
13 | 13 |
|
@@ -167,8 +167,21 @@ curl -L -o $old_json "https://github.com/esp8266/Arduino/releases/download/${bas |
167 | 167 | new_json=package_esp8266com_index.json |
168 | 168 |
|
169 | 169 | set +e |
170 | | -# Merge the old and new, then drop any obsolete package versions |
171 | | -python3 ../../merge_packages.py$new_json$old_json| python3 ../../drop_versions.py - tools 1.20.0-26-gb404fb9>tmp&& mv tmp$new_json&& rm$old_json |
| 170 | +# Merge the old and new |
| 171 | +python3 ../../merge_packages.py$new_json$old_json> tmp |
| 172 | + |
| 173 | +# additional json to merge (for experimental releases) |
| 174 | +echo"Additional json package files:${MOREJSONPACKAGES}" |
| 175 | +forjsonin${MOREJSONPACKAGES};do |
| 176 | +if [!-z"$json"-a-r"$json" ];then |
| 177 | +echo"- merging$json" |
| 178 | + python3 ../../merge_packages.py tmp$json> tmp2 |
| 179 | + mv tmp2 tmp |
| 180 | +fi |
| 181 | +done |
| 182 | + |
| 183 | +# drop any obsolete package versions |
| 184 | +python3 ../../drop_versions.py - tools 1.20.0-26-gb404fb9< tmp> tmp2&& mv tmp2$new_json&& rm$old_json tmp |
172 | 185 |
|
173 | 186 | # Verify the JSON file can be read, fail if it's not OK |
174 | 187 | set -e |
|