World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[MINOR] improvement(release): update docs version when release (#5090)
mchadesaa0e958500ef
diff --git a/dev/release/release-build.sh b/dev/release/release-build.shindex a66b338dd0..7327111977 100755--- a/dev/release/release-build.sh+++ b/dev/release/release-build.sh@@ -96,6 +96,9 @@ BASE_DIR=$(pwd)init_javainit_gradle+function uriencode { jq -nSRr --arg v "$1" '$v|@uri'; }+declare -r ENCODED_ASF_PASSWORD=$(uriencode "$ASF_PASSWORD")+if [[ "$1" == "finalize" ]]; thenif [[ -z "$PYPI_API_TOKEN" ]]; thenerror 'The environment variable PYPI_API_TOKEN is not set. Exiting.'@@ -110,7 +113,7 @@ if [[ "$1" == "finalize" ]]; thenecho "v$RELEASE_VERSION already exists. Skip creating it."elserm -rf gravitino- git clone "https://$ASF_USERNAME:$ASF_PASSWORD@$ASF_GRAVITINO_REPO" -b main+ git clone "https://$ASF_USERNAME:$ENCODED_ASF_PASSWORD@$ASF_GRAVITINO_REPO" -b maincd gravitinogit tag "v$RELEASE_VERSION" "$RELEASE_TAG"git push origin "v$RELEASE_VERSION"@@ -119,19 +122,20 @@ if [[ "$1" == "finalize" ]]; thenecho "git tag v$RELEASE_VERSION created"fi- # download Gravitino Python binary from the dev directory and upload to PyPi.+ # upload to PyPi.+ # todo: uncomment below codes if possible, it will download Gravitino Python binary from the dev directoryecho "Uploading Gravitino to PyPi"- svn co --depth=empty "$RELEASE_STAGING_LOCATION/$RELEASE_TAG" svn-gravitino- cd svn-gravitino+ # svn co --depth=empty "$RELEASE_STAGING_LOCATION/$RELEASE_TAG" svn-gravitino+ # cd svn-gravitinoPYGRAVITINO_VERSION=`echo "$RELEASE_VERSION" | sed -e "s/-/./" -e "s/preview/dev/"`- svn update "apache_gravitino-$PYGRAVITINO_VERSION.tar.gz"- svn update "apache_gravitino-$PYGRAVITINO_VERSION.tar.gz.asc"+ # svn update "apache_gravitino-$PYGRAVITINO_VERSION.tar.gz"+ # svn update "apache_gravitino-$PYGRAVITINO_VERSION.tar.gz.asc"twine upload -u __token__ -p $PYPI_API_TOKEN \--repository-url https://upload.pypi.org/legacy/ \"apache_gravitino-$PYGRAVITINO_VERSION.tar.gz" \"apache_gravitino-$PYGRAVITINO_VERSION.tar.gz.asc"- cd ..- rm -rf svn-gravitino+ # cd ..+ # rm -rf svn-gravitinoecho "Python Gravitino package uploaded"# Moves the binaries from dev directory to release directory.@@ -252,6 +256,12 @@ if [[ "$1" == "package" ]]; thenecho "Copying release tarballs"cp gravitino-* "svn-gravitino/${DEST_DIR_NAME}/"cp apache_gravitino-* "svn-gravitino/${DEST_DIR_NAME}/"+ # remove python client tarball+ # todo: remove this when python version supports include '-incubating' or the project is graduated+ rm "svn-gravitino/${DEST_DIR_NAME}/apache_gravitino-$PYGRAVITINO_VERSION.tar.gz"+ rm "svn-gravitino/${DEST_DIR_NAME}/apache_gravitino-$PYGRAVITINO_VERSION.tar.gz.asc"+ rm "svn-gravitino/${DEST_DIR_NAME}/apache_gravitino-$PYGRAVITINO_VERSION.tar.gz.sha512"+svn add "svn-gravitino/${DEST_DIR_NAME}"cd svn-gravitinodiff --git a/dev/release/release-tag.sh b/dev/release/release-tag.shindex 98fc8db85b..112ab8353d 100755--- a/dev/release/release-tag.sh+++ b/dev/release/release-tag.sh@@ -83,6 +83,9 @@ PYGRAVITINO_NEXT_VERSION=$(echo $NEXT_VERSION | sed 's/-incubating-SNAPSHOT/.devsed -i".tmp1" 's/version = .*$/version = '"$RELEASE_VERSION"'/g' gradle.propertiessed -i".tmp2" 's/ version=.*$/ version="'"$PYGRAVITINO_RELEASE_VERSION"'",/g' clients/client-python/setup.py+# update docs version+"$SELF/update-java-doc-version.sh" "$RELEASE_VERSION" "$SELF/gravitino"+git commit -a -m "Preparing Gravitino release $RELEASE_TAG"echo "Creating tag $RELEASE_TAG at the head of $GIT_BRANCH"git tag $RELEASE_TAGdiff --git a/dev/release/update-java-doc-version.sh b/dev/release/update-java-doc-version.shindex 13a29c37d2..4085ad8ab5 100755--- a/dev/release/update-java-doc-version.sh+++ b/dev/release/update-java-doc-version.sh@@ -20,27 +20,32 @@set -e-if [[ $# -ne 1 ]]; then- echo "Usage: $0 <new_version>"+if [[ $# -lt 1 || $# -gt 2 ]]; then+ echo "Usage: $0 <new_version> [project_dir]"exit 1fiNEW_VERSION=$1-cd "$(cd "$(dirname "$0")" && pwd)/../../docs"+PROJECT_DIR=${2:-$(cd "$(dirname "$0")" && pwd)/../../}+cd "${PROJECT_DIR}/docs"CURRENT_VERSION=`cat index.md| grep pathname:///docs | head -n 1 | awk -F '///docs' '{print $2}' | awk -F '/' '{print $2}'`if [[ "${NEW_VERSION}" == "${CURRENT_VERSION}" ]]; then- echo "The new version is the same as the current version."- exit 1+ echo "The new version is the same as the current version: ${NEW_VERSION}"+ exit 0fi# Detect the operating systemif [[ "$OSTYPE" == "darwin"* ]]; then# macOSfind "$(pwd)" -name "*.md" | xargs sed -i '' "s|/docs/${CURRENT_VERSION}/api|/docs/${NEW_VERSION}/api|g"+ # modify open-api/openapi.yaml+ sed -i '' "s|version: ${CURRENT_VERSION}|version: ${NEW_VERSION}|g" open-api/openapi.yamlelif [[ "$OSTYPE" == "linux-gnu"* ]]; then# Linuxfind "$(pwd)" -name "*.md" | xargs sed -i "s|/docs/${CURRENT_VERSION}/api|/docs/${NEW_VERSION}/api|g"+ # modify open-api/openapi.yaml+ sed -i "s|version: ${CURRENT_VERSION}|version: ${NEW_VERSION}|g" open-api/openapi.yamlelseecho "Unsupported OS"exit 1