8000 Small update to ease manual release generation (#7467) · yumkam/esp8266-Arduino@83fc47f · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 83fc47f

Browse files
authored
Small update to ease manual release generation (esp8266#7467)
1 parent 555c9eb commit 83fc47f

File tree

1 file changed

+31
-19
lines changed

1 file changed

+31
-19
lines changed

package/build_boards_manager_package.sh

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
11
#!/bin/bash
22

3-
# Extract the release name from a release
43

5-
# Default to draft tag name
6-
ver=$(basename $(jq -e -r '.ref' "$GITHUB_EVENT_PATH"))
7-
# If not available, try the publish tag name
8-
if [ "$ver" == "null" ]; then
9-
ver=$(jq -e -r '.release.tag_name' "$GITHUB_EVENT_PATH")
10-
fi
11-
# Fall back to the git description OTW (i.e. interactive)
12-
if [ "$ver" == "null" ]; then
13-
ver=$(git describe --tag)
14-
fi
15-
visiblever=$ver
16-
plainver=$ver
17-
18-
# Match 0.0.* as special-case early-access builds
19-
if [ "${ver%.*}" = 0.0 ]; then
20-
git tag -d ${ver}
21-
ver=`git describe --tag HEAD`
22-
plain_ver=$ver
4+
if [ ! -z "${manualversion}" ]; then
5+
6+
# manual-made release based on $manualversion
7+
ver=${manualversion}
8+
plain_ver=${ver}
9+
visiblever=${ver}
10+
[ -z "${REMOTE_URL}" ] && REMOTE_URL=https://github.com/esp8266/Arduino/releases/download
11+
12+
else
13+
14+
# Extract the release name from a release
15+
16+
# Default to draft tag name
17+
ver=$(basename $(jq -e -r '.ref' "$GITHUB_EVENT_PATH"))
18+
# If not available, try the publish tag name
19+
if [ "$ver" == "null" ]; then
20+
ver=$(jq -e -r '.release.tag_name' "$GITHUB_EVENT_PATH")
21+
fi
22+
# Fall back to the git description OTW (i.e. interactive)
23+
if [ "$ver" == "null" ]; then
24+
ver=$(git describe --tag)
25+
fi
26+
visiblever=$ver
27+
plainver=$ver
28+
29+
# Match 0.0.* as special-case early-access builds
30+
if [ "${ver%.*}" = 0.0 ]; then
31+
git tag -d ${ver}
32+
ver=`git describe --tag HEAD`
33+
plain_ver=$ver
34+
fi
2335
fi
2436

2537
set -e

0 commit comments

Comments
 (0)
0