HBASE-27894 create-release is broken by recent gitbox changes
Use the github webui to retrieve the project pom from the build branch instead of gitbox.
This commit is contained in:
parent
7b571ca9e4
commit
7727fd2091
|
@ -146,12 +146,12 @@ function get_release_info {
|
||||||
if [[ -z "${ASF_REPO}" ]]; then
|
if [[ -z "${ASF_REPO}" ]]; then
|
||||||
ASF_REPO="https://gitbox.apache.org/repos/asf/${PROJECT}.git"
|
ASF_REPO="https://gitbox.apache.org/repos/asf/${PROJECT}.git"
|
||||||
fi
|
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
|
if [[ -z "${ASF_GITHUB_REPO}" ]]; then
|
||||||
ASF_GITHUB_REPO="https://github.com/apache/${PROJECT}"
|
ASF_GITHUB_REPO="https://github.com/apache/${PROJECT}"
|
||||||
fi
|
fi
|
||||||
|
if [[ -z "${ASF_GITHUB_WEBUI}" ]] ; then
|
||||||
|
ASF_GITHUB_WEBUI="https://raw.githubusercontent.com/apache/${PROJECT}"
|
||||||
|
fi
|
||||||
if [ -z "$GIT_BRANCH" ]; then
|
if [ -z "$GIT_BRANCH" ]; then
|
||||||
# If no branch is specified, find out the latest branch from the repo.
|
# If no branch is specified, find out the latest branch from the repo.
|
||||||
GIT_BRANCH="$(git ls-remote --heads "$ASF_REPO" |
|
GIT_BRANCH="$(git ls-remote --heads "$ASF_REPO" |
|
||||||
|
@ -167,14 +167,14 @@ function get_release_info {
|
||||||
|
|
||||||
# Find the current version for the branch.
|
# Find the current version for the branch.
|
||||||
local version
|
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)"
|
parse_version)"
|
||||||
# We do not want to expand ${revision} here, see https://maven.apache.org/maven-ci-friendly.html
|
# 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
|
# If we use ${revision} as placeholder, we need to parse the revision property to
|
||||||
# get maven version
|
# get maven version
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
if [[ "${version}" == '${revision}' ]]; then
|
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)"
|
parse_revision)"
|
||||||
fi
|
fi
|
||||||
log "Current branch VERSION is $version."
|
log "Current branch VERSION is $version."
|
||||||
|
|
Loading…
Reference in New Issue