From e5a22923867132d2b22111ed9ee865cd13864da8 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 16 Jul 2024 15:48:45 +0200 Subject: [PATCH 1/4] chore(workflows): add DEPENDENCIES update to update-registry-library workflow --- .github/workflows/update-registry-library.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/update-registry-library.yaml b/.github/workflows/update-registry-library.yaml index 05c13ae00f..353824ab06 100644 --- a/.github/workflows/update-registry-library.yaml +++ b/.github/workflows/update-registry-library.yaml @@ -67,6 +67,10 @@ jobs: run: |- sed -i -e 's#.*#'$VERSION'#g' pom.xml + - name: Update DEPENDENCIES + run: | + mvn org.eclipse.dash:license-tool-plugin:license-check -Ddash.summary=DEPENDENCIES -P dash + - name: Create PR for irs-registry-client version update uses: peter-evans/create-pull-request@v6 with: From dd74d8a10086a51ae7cad64cf430e0e999cdd87c Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 16 Jul 2024 16:06:44 +0200 Subject: [PATCH 2/4] chore(workflows): add option to release the current snapshot version --- .github/workflows/update-registry-library.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-registry-library.yaml b/.github/workflows/update-registry-library.yaml index 353824ab06..7bd6ae132b 100644 --- a/.github/workflows/update-registry-library.yaml +++ b/.github/workflows/update-registry-library.yaml @@ -5,12 +5,13 @@ on: inputs: version-type: type: choice - description: Type of version increment + description: Type of version increment. 'none' will release the current -SNAPSHOT version without increment. required: true options: - 'major' - 'minor' - 'patch' + - 'none' is-release-version: type: boolean required: true @@ -51,6 +52,12 @@ jobs: patch=0 elif [ "$TYPE" == "patch" ]; then patch=$((patch + 1)) + elif [ "$TYPE" == "none" ]; then + if [ $IS_RELEASE_VERSION = 'true' ]; then + echo "Invalid increment type. Type 'none' is only supported in combination with 'is-release-version=true'." + exit 1 + fi + echo "Skipping version increment, only remove -SNAPSHOT" else echo "Invalid increment type. Use 'major', 'minor', or 'patch'." exit 1 @@ -59,6 +66,10 @@ jobs: if [ $IS_RELEASE_VERSION = 'true' ]; then new_version="${major}.${minor}.${patch}" fi + if [ $new_version == $CURRENT_VERSION ]; then + echo "New version is equal to current version." + exit 1 + fi echo NEXT_VERSION="$new_version" >> $GITHUB_ENV - name: Update irs-registry-client version From e09affabd750633887b704644442ba2085d69e77 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 16 Jul 2024 16:12:58 +0200 Subject: [PATCH 3/4] chore(workflows): add DEPENDENCIES update to update-registry-library workflow --- .github/workflows/update-registry-library.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-registry-library.yaml b/.github/workflows/update-registry-library.yaml index 7bd6ae132b..ea85394775 100644 --- a/.github/workflows/update-registry-library.yaml +++ b/.github/workflows/update-registry-library.yaml @@ -53,7 +53,7 @@ jobs: elif [ "$TYPE" == "patch" ]; then patch=$((patch + 1)) elif [ "$TYPE" == "none" ]; then - if [ $IS_RELEASE_VERSION = 'true' ]; then + if [ $IS_RELEASE_VERSION = 'false' ]; then echo "Invalid increment type. Type 'none' is only supported in combination with 'is-release-version=true'." exit 1 fi From 692776bebd8e321700735a0fb2c5239e9c4e92ed Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 16 Jul 2024 16:18:29 +0200 Subject: [PATCH 4/4] chore(workflows): add DEPENDENCIES update to update-registry-library workflow --- .github/workflows/update-registry-library.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-registry-library.yaml b/.github/workflows/update-registry-library.yaml index ea85394775..b3ee7cbfab 100644 --- a/.github/workflows/update-registry-library.yaml +++ b/.github/workflows/update-registry-library.yaml @@ -67,7 +67,7 @@ jobs: new_version="${major}.${minor}.${patch}" fi if [ $new_version == $CURRENT_VERSION ]; then - echo "New version is equal to current version." + echo "New version $new_version is equal to current version $CURRENT_VERSION." exit 1 fi echo NEXT_VERSION="$new_version" >> $GITHUB_ENV