Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small update to ease manual release generation #7467

Merged
merged 3 commits into from
Jul 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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