From 040a64f3d6782980295f90cdad7a8fe0f9fe54c3 Mon Sep 17 00:00:00 2001 From: Jerry Shao Date: Thu, 8 Aug 2024 14:51:00 +0800 Subject: [PATCH] [MINOR] build: Change the version to 0.6.0-incubating-SNAPSHOT (#4432) ### What changes were proposed in this pull request? Change the version to 0.6.0-incubating-SNAPSHOT for branch-0.6. ### Why are the changes needed? To prepare for the Apache release. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing CIs. Co-authored-by: Qi Yu --- .../apache/gravitino/client/GravitinoVersion.java | 2 +- .../gravitino/client/TestGravitinoVersion.java | 14 ++++++++++++++ clients/client-python/gravitino/exceptions/base.py | 1 - clients/client-python/setup.py | 2 +- gradle.properties | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoVersion.java b/clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoVersion.java index 6e343bb3a78..25fc8c50e96 100644 --- a/clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoVersion.java +++ b/clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoVersion.java @@ -41,7 +41,7 @@ public class GravitinoVersion extends VersionDTO implements Comparable { @VisibleForTesting /** @return parse the version number for a version string */ int[] getVersionNumber() { - Pattern pattern = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(-\\w+)?"); + Pattern pattern = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)([-\\w]+)?"); Matcher matcher = pattern.matcher(version()); if (matcher.matches()) { int[] versionNumbers = new int[VERSION_PART_NUMBER]; diff --git a/clients/client-java/src/test/java/org/apache/gravitino/client/TestGravitinoVersion.java b/clients/client-java/src/test/java/org/apache/gravitino/client/TestGravitinoVersion.java index f6bb91a77c1..99d426b8a47 100644 --- a/clients/client-java/src/test/java/org/apache/gravitino/client/TestGravitinoVersion.java +++ b/clients/client-java/src/test/java/org/apache/gravitino/client/TestGravitinoVersion.java @@ -49,6 +49,20 @@ void testParseVersionString() { assertEquals(5, versionNumber[1]); assertEquals(3, versionNumber[2]); + // Test incubator version + version = new GravitinoVersion("2.5.3-incubating", "2023-01-01", "1234567"); + versionNumber = version.getVersionNumber(); + assertEquals(2, versionNumber[0]); + assertEquals(5, versionNumber[1]); + assertEquals(3, versionNumber[2]); + + // Test incubator snapshot version + version = new GravitinoVersion("2.5.3-incubating-SNAPSHOT", "2023-01-01", "1234567"); + versionNumber = version.getVersionNumber(); + assertEquals(2, versionNumber[0]); + assertEquals(5, versionNumber[1]); + assertEquals(3, versionNumber[2]); + // Test an invalid the version string with 2 part version = new GravitinoVersion("2.5", "2023-01-01", "1234567"); assertThrows(GravitinoRuntimeException.class, version::getVersionNumber); diff --git a/clients/client-python/gravitino/exceptions/base.py b/clients/client-python/gravitino/exceptions/base.py index 59b2e05a417..a7d6eee1831 100644 --- a/clients/client-python/gravitino/exceptions/base.py +++ b/clients/client-python/gravitino/exceptions/base.py @@ -101,4 +101,3 @@ class UnauthorizedException(GravitinoRuntimeException): class BadRequestException(GravitinoRuntimeException): """An exception thrown when the request is invalid.""" - diff --git a/clients/client-python/setup.py b/clients/client-python/setup.py index 3e7c4d51036..6d055696c22 100644 --- a/clients/client-python/setup.py +++ b/clients/client-python/setup.py @@ -29,7 +29,7 @@ setup( name="gravitino", description="Python lib/client for Gravitino", - version="0.6.0.dev1", + version="0.6.0.dev", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/apache/gravitino", diff --git a/gradle.properties b/gradle.properties index b4deeef339d..92acb0d0fbe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,7 +23,7 @@ org.gradle.caching=true org.gradle.jvmargs=-Xmx4g # version that is going to be updated automatically by releases -version = 0.6.0-SNAPSHOT +version = 0.6.0-incubating-SNAPSHOT # sonatype credentials SONATYPE_USER = admin