File tree Expand file tree Collapse file tree
dev-support/create-release Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,6 +138,8 @@ function get_api_diff_version {
138138# Get all branches that begin with 'branch-', the hbase convention for
139139# release branches, sort them and then pop off the most recent.
140140function get_release_info {
141+ init_xmllint
142+
141143 PROJECT=" $( read_config " PROJECT" " $PROJECT " ) "
142144 export PROJECT
143145
@@ -355,6 +357,17 @@ function init_locale {
355357 export LANG=" $locale_value "
356358}
357359
360+ # Check whether xmllint is available
361+ function init_xmllint {
362+ if ! [ -x " $( command -v xmllint) " ]; then
363+ log " Error: xmllint is not available, we need to use it for parsing pom.xml." >&2
364+ log " Ubuntu: apt install libxml2-utils"
365+ log " CentOS: yum install xmlstarlet"
366+ log " Mac OS: brew install xmlstarlet"
367+ exit 1
368+ fi
369+ }
370+
358371# Initializes JAVA_VERSION to the version of the JVM in use.
359372function init_java {
360373 if [ -z " $JAVA_HOME " ]; then
You can’t perform that action at this time.
0 commit comments