From 3b4afbb6a804e94ba57ebf5eed9a355e1ed3ecd4 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Tue, 17 Oct 2023 10:39:47 +0200 Subject: [PATCH 1/5] feat(irs-registry-client):[TRI-1468] Add maven source and javadoc plugin --- irs-registry-client/pom.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/irs-registry-client/pom.xml b/irs-registry-client/pom.xml index fa3ce498d1..71ac2bc2cf 100644 --- a/irs-registry-client/pom.xml +++ b/irs-registry-client/pom.xml @@ -80,6 +80,32 @@ + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + attach-javadocs + + jar + + + + From 6e54c05c61b8d97bc724c8707a8572ddcf577d9c Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Tue, 17 Oct 2023 10:40:26 +0200 Subject: [PATCH 2/5] feat(workflows):[TRI-1468] Add sources and javadoc packages --- .github/workflows/maven-deploy.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/maven-deploy.yaml b/.github/workflows/maven-deploy.yaml index 1ad049cf89..d5fdfa8648 100644 --- a/.github/workflows/maven-deploy.yaml +++ b/.github/workflows/maven-deploy.yaml @@ -88,3 +88,5 @@ jobs: fi echo "Publishing Version $VERSION to Sonatype Repository $REPOSITORY_URL" mvn -s $HOME/.m2/settings.xml --batch-mode gpg:sign-and-deploy-file -Dgpg.passphrase="${{ secrets.ORG_GPG_PASSPHRASE }}" -Durl=$REPOSITORY_URL -DrepositoryId=ossrh -Dfile=irs-registry-client/target/irs-registry-client-$VERSION-jar-with-dependencies.jar -DgroupId=org.eclipse.tractusx.irs -DartifactId=irs-registry-client -Dversion=$VERSION -Dpackaging=jar + mvn -s $HOME/.m2/settings.xml --batch-mode gpg:sign-and-deploy-file -Dgpg.passphrase="${{ secrets.ORG_GPG_PASSPHRASE }}" -Durl=$REPOSITORY_URL -DrepositoryId=ossrh -Dfile=irs-registry-client/target/irs-registry-client-$VERSION-sources.jar -Dclassifier=sources -DgroupId=org.eclipse.tractusx.irs -DartifactId=irs-registry-client -Dversion=$VERSION -Dpackaging=jar + mvn -s $HOME/.m2/settings.xml --batch-mode gpg:sign-and-deploy-file -Dgpg.passphrase="${{ secrets.ORG_GPG_PASSPHRASE }}" -Durl=$REPOSITORY_URL -DrepositoryId=ossrh -Dfile=irs-registry-client/target/irs-registry-client-$VERSION-javadoc.jar -Dclassifier=javadoc -DgroupId=org.eclipse.tractusx.irs -DartifactId=irs-registry-client -Dversion=$VERSION -Dpackaging=jar From e4eedb75734a81cbd9eb1504a49ccbeb1f5f30cb Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Tue, 17 Oct 2023 10:42:34 +0200 Subject: [PATCH 3/5] feat(workflows):[TRI-1468] Add workflow to update the registry client version --- .../workflows/update-registry-library.yaml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/update-registry-library.yaml diff --git a/.github/workflows/update-registry-library.yaml b/.github/workflows/update-registry-library.yaml new file mode 100644 index 0000000000..e8a457dc72 --- /dev/null +++ b/.github/workflows/update-registry-library.yaml @@ -0,0 +1,83 @@ +name: Update irs-registry-client Version + +on: + workflow_dispatch: + inputs: + version-type: + type: choice + description: Type of version increment + required: true + options: + - 'major' + - 'minor' + - 'path' + is-release-version: + type: boolean + required: true + default: false + description: Select this if you want to create a release version (x.x.x) instead of a SNAPSHOT. + +jobs: + open-pr-with-version-update: + name: "Open a Pull Request with the updated version of irs-registry-client." + runs-on: ubuntu-latest + needs: + - validate-input-version + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - name: Create new version + env: + TYPE: ${{ inputs.version-type }} + IS_RELEASE_VERSION: ${{ inputs.is-release-version }} + run: | + CURRENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -pl irs-registry-client) + IFS='.' read -ra version_parts <<<"$CURRENT_VERSION" + major="${version_parts[0]}" + minor="${version_parts[1]}" + patch="${version_parts[2]}" + # Increment the version based on the increment type + if [ "$TYPE" == "major" ]; then + major=$((major + 1)) + minor=0 + patch=0 + elif [ "$TYPE" == "minor" ]; then + minor=$((minor + 1)) + patch=0 + elif [ "$TYPE" == "patch" ]; then + patch=$((patch + 1)) + else + echo "Invalid increment type. Use 'major', 'minor', or 'patch'." + exit 1 + fi + new_version="${major}.${minor}.${patch}-SNAPSHOT" + if [ $IS_RELEASE_VERSION = 'true' ]; then + new_version="${major}.${minor}.${patch}" + fi + echo "$new_version" + + - name: Update irs-registry-client version + env: + VERSION: ${{ inputs.next-version }} + run: |- + sed -i -e 's#.*#'$VERSION'#g' pom.xml + + - name: Create PR for irs-registry-client version update + uses: peter-evans/create-pull-request@v5 + env: + VERSION: ${{ inputs.next-version }} + with: + commit-message: "chore(dependencies): Update irs-registry-client to $VERSION" + branch: chore/update-irs-registry-client-$VERSION + base: main + delete-branch: true + title: Update irs-registry-client to $VERSION + body: | + This PR updates the irs-registry-client version to $VERSION. From cc2d398ec518fb57b9ac2a8192d97df5decd5304 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Tue, 17 Oct 2023 10:43:59 +0200 Subject: [PATCH 4/5] feat(workflows):[TRI-1468] Add workflow to update the DEPENDENCIES file --- .github/workflows/dependencies-update.yaml | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/dependencies-update.yaml diff --git a/.github/workflows/dependencies-update.yaml b/.github/workflows/dependencies-update.yaml new file mode 100644 index 0000000000..6729bd1d64 --- /dev/null +++ b/.github/workflows/dependencies-update.yaml @@ -0,0 +1,61 @@ +name: "Update DEPENDENCIES file" + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - name: Cache maven packages + uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + - name: Generate Dependencies file + run: mvn org.eclipse.dash:license-tool-plugin:license-check -Ddash.summary=DEPENDENCIES + + - name: Check if file was changed + run: | + if git diff --name-only ${{ github.base_ref }}...${{ github.sha }} | grep -e 'DEPENDENCIES'; then + echo "The file was changed" + echo "was_file_changed=true" >> "$GITHUB_ENV" + git + else + echo "The file was not changed" + echo "was_file_changed=false" >> "$GITHUB_ENV" + fi + + - name: Configure Git + if: ${{ env.was_file_changed }} == 'true' + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Create pull request + if: ${{ env.was_file_changed }} == 'true' + uses: peter-evans/create-pull-request@v5 + with: + add-paths: | + DEPENDENCIES + token: ${{ secrets.GITHUB_TOKEN }} + branch: chore/update-DEPENDENCIES + commit-message: "chore(dependencies): Update DEPENDENCIES" + delete-branch: true + title: Update DEPENDENCIES + body: | + This PR updates the DEPENDENCIES From e413b931f2f01eeaafac7522c433f197d3470cce Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Tue, 17 Oct 2023 10:44:36 +0200 Subject: [PATCH 5/5] feat(dependencies):[TRI-1468] Update irs-registry-client to 1.3.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 008fa79107..5a6ec93e0f 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ - 1.3.1-SNAPSHOT + 1.3.1 3.1.4