File tree 2 files changed +18
-23
lines changed
2 files changed +18
-23
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- # set -x
3
+ # Extract the release name from a release
4
4
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
6
15
visiblever=$ver
7
- # match 0.0.*
8
- if [ " ${ver% .* } " = 0.0 ]; then
16
+ plainver=$ver
9
17
18
+ # Match 0.0.* as special-case early-access builds
19
+ if [ " ${ver% .* } " = 0.0 ]; then
10
20
git tag -d ${ver}
11
21
ver=` git describe --tag HEAD`
12
22
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
31
23
fi
32
24
33
25
set -e
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# This script updates package index hosted on esp8266.github.io (aka arduino.esp8266.com).
3
3
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
5
8
6
9
cd $( dirname " $0 " )
7
10
You can’t perform that action at this time.
0 commit comments