Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[MINOR] improvement(release): improve release script (#5080)

mchadesaa481dcf59bd
diff --git a/dev/release/release-build.sh b/dev/release/release-build.sh
index 3fd74e9efe..a66b338dd0 100755
--- a/dev/release/release-build.sh
+++ b/dev/release/release-build.sh
@@ -193,6 +193,7 @@ if [[ "$1" == "package" ]]; then
rm -f gravitino-$GRAVITINO_VERSION-src/web/LICENSE.bin
rm -f gravitino-$GRAVITINO_VERSION-src/web/NOTICE.bin
+ rm -f *.asc
tar cvzf gravitino-$GRAVITINO_VERSION-src.tar.gz --exclude gravitino-$GRAVITINO_VERSION-src/.git gravitino-$GRAVITINO_VERSION-src
echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --armour --output gravitino-$GRAVITINO_VERSION-src.tar.gz.asc \
--detach-sig gravitino-$GRAVITINO_VERSION-src.tar.gz
@@ -286,7 +287,7 @@ if [[ "$1" == "publish-release" ]]; then
cd gravitino-$GRAVITINO_VERSION-publish
# Using Nexus API documented here:
- # https://support.sonatype.com/entries/39720203-Uploading-to-a-Staging-Repository-via-REST-API
+ # https://support.sonatype.com/hc/en-us/articles/213465868-Uploading-to-a-Nexus-Repository-2-Staging-Repository-via-REST-API
if ! is_dry_run; then
echo "Creating Nexus staging repository"
repo_request="<promoteRequest><data><description>Apache Gravitino $GRAVITINO_VERSION (commit $git_hash)</description></data></promoteRequest>"
diff --git a/dev/release/release-tag.sh b/dev/release/release-tag.sh
index a6ae3cea35..98fc8db85b 100755
--- a/dev/release/release-tag.sh
+++ b/dev/release/release-tag.sh
@@ -111,6 +111,7 @@ if ! is_dry_run; then
rm -fr gravitino
else
cd ..
+ rm -rf gravitino-tag
mv gravitino gravitino-tag
echo "Clone with version changes and tag available as gravitino-tag in the output directory."
fi
diff --git a/dev/release/release-util.sh b/dev/release/release-util.sh
index aa3913dad1..ca2c69be20 100755
--- a/dev/release/release-util.sh
+++ b/dev/release/release-util.sh
@@ -219,8 +219,16 @@ function init_java {
if [ -z "$JAVA_HOME" ]; then
error "JAVA_HOME is not set."
fi
+ echo "JAVA_HOME is $JAVA_HOME"
+
+ if [ -x "${JAVA_HOME}/bin/javac" ]; then
+ JAVA_VERSION=$("${JAVA_HOME}/bin/javac" -version 2>&1 | cut -d " " -f 2)
+ else
+ error "javac not found in ${JAVA_HOME}/bin, please ensure you have a JDK installed."
+ fi
JAVA_VERSION=$("${JAVA_HOME}"/bin/javac -version 2>&1 | cut -d " " -f 2)
export JAVA_VERSION
+ echo "Java version is $JAVA_VERSION"
}
function init_gradle {