From 5230d150acd5699f50ee161ee4204e7302e81b24 Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger Date: Fri, 23 Jun 2023 00:13:50 +0200 Subject: [PATCH] fix: revert wrong version, fix bump job --- .github/actions/bump-version/action.yml | 22 +++++++++------------- gradle.properties | 8 ++++---- gradle/libs.versions.toml | 2 +- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/actions/bump-version/action.yml b/.github/actions/bump-version/action.yml index 3de9e51..54ea494 100644 --- a/.github/actions/bump-version/action.yml +++ b/.github/actions/bump-version/action.yml @@ -25,34 +25,30 @@ runs: git checkout ${{ inputs.target_branch }} # use current version from input - oldVersion=${{ inputs.base_version }} - if [ -z $oldVersion ]; then - #... or read it from gradle.properties - echo "No base_version input was given, will read base version from gradle.properties" - oldVersion=$(grep "version" gradle.properties | awk -F= '{print $2}') - fi + baseVersion=${{ inputs.base_version }} + existingVersion=$(grep "version" gradle.properties | awk -F= '{print $2}') # read the major, minor, and patch components, consume -SNAPSHOT - IFS=.- read -r RELEASE_VERSION_MAJOR RELEASE_VERSION_MINOR RELEASE_VERSION_PATCH SNAPSHOT<<<"$oldVersion" + IFS=.- read -r RELEASE_VERSION_MAJOR RELEASE_VERSION_MINOR RELEASE_VERSION_PATCH SNAPSHOT<<<"$baseVersion" INC=0 # Compute new snapshot version, do not increment snapshot on non-final releases, e.g. -rc1 if [ -z $SNAPSHOT ]; then - echo "$oldVersion is a final release version, increase patch for next snapshot" + echo "$baseVersion is a final release version, increase patch for next snapshot" INC=1 else - echo "$oldVersion is not a final release version (contains \"$SNAPSHOT\"), will not increase patch" + echo "$baseVersion is not a final release version (contains \"$SNAPSHOT\"), will not increase patch" fi # construct the new version newVersion="$RELEASE_VERSION_MAJOR.$RELEASE_VERSION_MINOR.$((RELEASE_VERSION_PATCH+$INC))"-SNAPSHOT - # replace every occurrence of =$oldVersion with =$newVersion - grep -rlz "$oldVersion" . --exclude=\*.{sh,bin} | xargs sed -i "s/$oldVersion/$newVersion/g" + # replace every occurrence of =$baseVersion with =$newVersion + grep -rlz "$existingVersion" . --exclude=\*.{sh,bin} | xargs sed -i "s/$existingVersion/$newVersion/g" - echo "Bumped the version from $oldVersion to $newVersion" + echo "Bumped the version from $baseVersion to $newVersion" # Commit and push to the desired branch, defaults to 'main' git add . - git commit --message "Bump version from $oldVersion to $newVersion [skip ci]" + git commit --message "Bump version from $baseVersion to $newVersion [skip ci]" git push origin ${{ inputs.target_branch }} diff --git a/gradle.properties b/gradle.properties index 55f2646..97d96c4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,10 @@ group=org.eclipse.edc -version=0.1.3-SNAPSHOT-SNAPSHOT +version=0.1.3-SNAPSHOT # configure the build: -annotationProcessorVersion=0.1.3-SNAPSHOT-SNAPSHOT -edcGradlePluginsVersion=0.1.3-SNAPSHOT-SNAPSHOT -metaModelVersion=0.1.3-SNAPSHOT-SNAPSHOT +annotationProcessorVersion=0.1.3-SNAPSHOT +edcGradlePluginsVersion=0.1.3-SNAPSHOT +metaModelVersion=0.1.3-SNAPSHOT # used for publishing artifacts and plugins techGcpScmConnection=scm:git:git@github.com:eclipse-edc/Technology-Aws.git diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 922e839..d8c3fc9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ format.version = "1.1" googleCloudIamAdmin = "3.14.0" googleCloudIamCredentials = "2.18.0" googleCloudStorage = "2.22.4" -edc = "0.1.3-SNAPSHOT-SNAPSHOT" +edc = "0.1.3-SNAPSHOT" mockito = "5.2.0" failsafe = "3.3.1"