Skip to content

Commit a4c7e1a

Browse files
Update package and update script
1 parent 2d08c09 commit a4c7e1a

File tree

2 files changed

+18
-23
lines changed

2 files changed

+18
-23
lines changed

package/build_boards_manager_package.sh

+14-22
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,25 @@
11
#!/bin/bash
22

3-
#set -x
3+
# Extract the release name from a release
44

5-
ver=`git describe --tag`
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 [ $? -ne 0 ]; 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 [ $? -ne 0 ]; then
13+
ver=$(git describe --tag)
14+
fi
615
visiblever=$ver
7-
# match 0.0.*
8-
if [ "${ver%.*}" = 0.0 ]; then
16+
plainver=$ver
917

18+
# Match 0.0.* as special-case early-access builds
19+
if [ "${ver%.*}" = 0.0 ]; then
1020
git tag -d ${ver}
1121
ver=`git describe --tag HEAD`
1222
plain_ver=$ver
13-
14-
else
15-
16-
# Extract next version from platform.txt
17-
next=`sed -n -E 's/version=([0-9.]+)/\1/p' ../platform.txt`
18-
19-
# Figure out how will the package be called
20-
ver=`git describe --exact-match`
21-
if [ $? -ne 0 ]; then
22-
# not tagged version; generate nightly package
23-
date_str=`date +"%Y%m%d"`
24-
is_nightly=1
25-
plain_ver="${next}-nightly"
26-
ver="${plain_ver}+${date_str}"
27-
else
28-
plain_ver=$ver
29-
fi
30-
visiblever=$ver
3123
fi
3224

3325
set -e

package/deploy_package_index.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#!/bin/bash
22
# This script updates package index hosted on esp8266.github.io (aka arduino.esp8266.com).
33

4-
tag=`git describe --tags`
4+
tag=$(jq -r '.release.tag_name' "$GITHUB_EVENT_PATH")
5+
if [ "$tag" == "" ]; then
6+
tag=`git describe --tags`
7+
fi
58

69
cd $(dirname "$0")
710

0 commit comments

Comments
 (0)