From 264aa777f8a3a2c78b517bf0519f72806d89561b Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Fri, 22 Mar 2024 12:33:41 +0100 Subject: [PATCH 1/2] chore(charts): [#489] Fix numeric sorting by version --- .github/workflows/helm-chart-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm-chart-release.yaml b/.github/workflows/helm-chart-release.yaml index 85a0c8f004..d852fbfea6 100644 --- a/.github/workflows/helm-chart-release.yaml +++ b/.github/workflows/helm-chart-release.yaml @@ -25,7 +25,7 @@ jobs: - name: Get helm charts latest tag version id: step1 run: | - latestVersion=$(git tag | grep "irs-helm-[1-9]" | tail -1) + latestVersion=$(git tag | grep "irs-helm-[1-9]" | sort -V | tail -1) echo "::set-output name=latest_version::$latestVersion" echo "Exported $latestVersion latest helm charts version" - name: Get helm charts current version From bb134cce28513b1be9a8f32fda20889b4c7c25f1 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Fri, 22 Mar 2024 12:37:37 +0100 Subject: [PATCH 2/2] chore(charts): [#489] Fixes (tag also changes to "item-relationship-service-x.x.x", therefore we need to rename this too) --- .github/workflows/helm-chart-release.yaml | 6 +++--- CONTRIBUTING.md | 17 +++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/helm-chart-release.yaml b/.github/workflows/helm-chart-release.yaml index d852fbfea6..1ad1bbde98 100644 --- a/.github/workflows/helm-chart-release.yaml +++ b/.github/workflows/helm-chart-release.yaml @@ -25,13 +25,13 @@ jobs: - name: Get helm charts latest tag version id: step1 run: | - latestVersion=$(git tag | grep "irs-helm-[1-9]" | sort -V | tail -1) + latestVersion=$(git tag | grep "item-relationship-service-[1-9]" | sort -V | tail -1) echo "::set-output name=latest_version::$latestVersion" echo "Exported $latestVersion latest helm charts version" - name: Get helm charts current version id: step2 run: | - chartVersion=irs-helm-$(cat ./charts/item-relationship-service/Chart.yaml | grep "version:" | head -1 | cut -d ":" -d " " -f2) + chartVersion=item-relationship-service-$(cat ./charts/item-relationship-service/Chart.yaml | grep "version:" | head -1 | cut -d ":" -d " " -f2) echo "::set-output name=current_version::$chartVersion" echo "Exported $chartVersion helm charts version" @@ -73,7 +73,7 @@ jobs: run: | touch CHANGELOG-temp.md - currentVersionNumber=$(echo ${{ needs.get-helm-charts-versions-irs.outputs.current_version }} | sed -e "s/^irs-helm-//" ) + currentVersionNumber=$(echo ${{ needs.get-helm-charts-versions-irs.outputs.current_version }} | sed -e "s/^item-relationship-service-//" ) echo currentVersionNumber=$currentVersionNumber sed -n -e '/## \['"${currentVersionNumber}"'\]/,/## \[/ p' CHANGELOG.md | head -n -1 | tail -n +2 >> CHANGELOG-temp.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a67b14f33f..6d1692a3fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -177,20 +177,21 @@ https://github.com/google/google-java-format/blob/master/README.md#intellij-jre- - Add the corresponding GitHub issue numbers to each entry if missing. 3. Update [COMPATIBILITY_MATRIX.md](COMPATIBILITY_MATRIX.md). 4. Update IRS API version in IrsApplication class and irs-api.yaml -5. Create pull request from [release preparation branch to main](https://github.com/eclipse-tractusx/item-relationship-service/compare/chore/prepare-release-x.x.x) and merge to main. -6. Create Git tag for the desired release version `git tag x.x.x` - (note: the _irs-helm_ tag will be created automatically by the GitHub workflow based on the version in the _irs-helm_ changelog). -7. Push Git tag to repository `git push origin x.x.x` (this will trigger the GitHub release workflow). -8. Wait for release workflow to complete. -9. Merge the automatically opened PR by GitHub actions bot. -10. Notify about the release in IRS Matrix Chat using the following template: +5. Create pull request from [release preparation branch to main](https://github.com/eclipse-tractusx/item-relationship-service/compare/chore/prepare-release-x.x.x) +6. Merge this pull request to main. +7. Create Git tag for the desired release version `git tag x.x.x` + (note: the _item-relationship-service_ tag will be created automatically by the GitHub workflow based on the version in the [helm chart changelog](charts/item-relationship-service/CHANGELOG.md)). +8. Push Git tag to repository `git push origin x.x.x` (this will trigger the GitHub release workflow). +9. Wait for release workflow to complete. +10. Merge the pull request that was automatically opened by GitHub actions bot. +11. Notify about the release in IRS Matrix Chat using the following template: > **IRS Release x.x.x** > > IRS version x.x.x is released. > > https://github.com/eclipse-tractusx/item-relationship-service/releases/tag/x.x.x
- > https://github.com/eclipse-tractusx/item-relationship-service/releases/tag/irs-helm-y.y.y
+ > https://github.com/eclipse-tractusx/item-relationship-service/releases/tag/item-relationship-service-y.y.y
> **Full Changelog:** https://github.com/eclipse-tractusx/item-relationship-service/compare/w.w.w...x.x.x _(replace x.x.x with IRS version to release, y.y.y with IRS helm version to release and w.w.w with previous IRS version)_