Skip to content

Commit

Permalink
fix: revert wrong version, fix bump job
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Jun 22, 2023
1 parent e93c623 commit 5230d15
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
22 changes: 9 additions & 13 deletions .github/actions/bump-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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:[email protected]:eclipse-edc/Technology-Aws.git
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 5230d15

Please sign in to comment.