Skip to content

Commit

Permalink
HBASE-27894 create-release is broken by recent gitbox changes (#5262)
Browse files Browse the repository at this point in the history
Use the github webui to retrieve the project pom from the build branch
instead of gitbox.

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
  • Loading branch information
apurtell authored Jun 16, 2023
1 parent 4be74d2 commit f534d82
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dev-support/create-release/release-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ function get_release_info {
if [[ -z "${ASF_REPO}" ]]; then
ASF_REPO="https://gitbox.apache.org/repos/asf/${PROJECT}.git"
fi
if [[ -z "${ASF_REPO_WEBUI}" ]]; then
ASF_REPO_WEBUI="https://gitbox.apache.org/repos/asf?p=${PROJECT}.git"
fi
if [[ -z "${ASF_GITHUB_REPO}" ]]; then
ASF_GITHUB_REPO="https://github.com/apache/${PROJECT}"
fi
if [[ -z "${ASF_GITHUB_WEBUI}" ]] ; then
ASF_GITHUB_WEBUI="https://raw.githubusercontent.com/apache/${PROJECT}"
fi
if [ -z "$GIT_BRANCH" ]; then
# If no branch is specified, find out the latest branch from the repo.
GIT_BRANCH="$(git ls-remote --heads "$ASF_REPO" |
Expand All @@ -167,14 +167,14 @@ function get_release_info {

# Find the current version for the branch.
local version
version="$(curl -s "$ASF_REPO_WEBUI;a=blob_plain;f=pom.xml;hb=refs/heads/$GIT_BRANCH" |
version="$(curl -s "$ASF_GITHUB_WEBUI/refs/heads/$GIT_BRANCH/pom.xml" |
parse_version)"
# We do not want to expand ${revision} here, see https://maven.apache.org/maven-ci-friendly.html
# If we use ${revision} as placeholder, we need to parse the revision property to
# get maven version
# shellcheck disable=SC2016
if [[ "${version}" == '${revision}' ]]; then
version="$(curl -s "$ASF_REPO_WEBUI;a=blob_plain;f=pom.xml;hb=refs/heads/$GIT_BRANCH" |
version="$(curl -s "$ASF_GITHUB_WEBUI/refs/heads/$GIT_BRANCH/pom.xml" |
parse_revision)"
fi
log "Current branch VERSION is $version."
Expand Down

0 comments on commit f534d82

Please sign in to comment.