Skip to content

Commit

Permalink
Small update to ease manual release generation (#7467)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-a-v committed Jul 23, 2020
1 parent 555c9eb commit 83fc47f
Showing 1 changed file with 31 additions and 19 deletions.
50 changes: 31 additions & 19 deletions package/build_boards_manager_package.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
#!/bin/bash

# Extract the release name from a release

# Default to draft tag name
ver=$(basename $(jq -e -r '.ref' "$GITHUB_EVENT_PATH"))
# If not available, try the publish tag name
if [ "$ver" == "null" ]; then
ver=$(jq -e -r '.release.tag_name' "$GITHUB_EVENT_PATH")
fi
# Fall back to the git description OTW (i.e. interactive)
if [ "$ver" == "null" ]; then
ver=$(git describe --tag)
fi
visiblever=$ver
plainver=$ver

# Match 0.0.* as special-case early-access builds
if [ "${ver%.*}" = 0.0 ]; then
git tag -d ${ver}
ver=`git describe --tag HEAD`
plain_ver=$ver
if [ ! -z "${manualversion}" ]; then

# manual-made release based on $manualversion
ver=${manualversion}
plain_ver=${ver}
visiblever=${ver}
[ -z "${REMOTE_URL}" ] && REMOTE_URL=https://github.com/esp8266/Arduino/releases/download

else

# Extract the release name from a release

# Default to draft tag name
ver=$(basename $(jq -e -r '.ref' "$GITHUB_EVENT_PATH"))
# If not available, try the publish tag name
if [ "$ver" == "null" ]; then
ver=$(jq -e -r '.release.tag_name' "$GITHUB_EVENT_PATH")
fi
# Fall back to the git description OTW (i.e. interactive)
if [ "$ver" == "null" ]; then
ver=$(git describe --tag)
fi
visiblever=$ver
plainver=$ver

# Match 0.0.* as special-case early-access builds
if [ "${ver%.*}" = 0.0 ]; then
git tag -d ${ver}
ver=`git describe --tag HEAD`
plain_ver=$ver
fi
fi

set -e
Expand Down

0 comments on commit 83fc47f

Please sign in to comment.