Skip to content

Commit

Permalink
Add release version check
Browse files Browse the repository at this point in the history
  • Loading branch information
gtroitsk committed Mar 7, 2024
1 parent 0549f67 commit 22bfe5a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 81 deletions.
4 changes: 2 additions & 2 deletions .github/project.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Quarkus QE Test Framework
release:
current-version: 1.4.2.Beta8
next-version: 1.4.3.Beta8
current-version: 1.4.4.Beta1
next-version: 1.4.3.Beta2
35 changes: 35 additions & 0 deletions .github/workflows/check-release-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Check release version
on:
push:
paths:
- .github/project.yml
jobs:
check-release-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check release version
run: |
release=$(curl -sSL "https://github.com/gitapi/repos/${GITHUB_REPOSITORY}/releases/latest" | jq -r .tag_name)
release_subversion=$(echo "$release" | cut -d"." -f3,3)
release_stage_number=$(echo "$release" | cut -d"." -f4,4 | grep -o '[0-9]' || true)
next_version=$(grep -E 'current-version:\s*' .github/project.yml | awk '{print $2}')
next_version_subversion=$(echo "$next_version" | cut -d"." -f3,3)
next_version_stage_number=$(echo "$next_version" | cut -d"." -f4,4 | grep -o '[0-9]' || true)
if ! [[ $release =~ .*Final$ ]]; then
if [[ $next_version_subversion > $release_subversion ]]; then
echo "Error: you are bumping the FW sub version when the previous release was not Final"
exit 1;
fi
if [[ $next_version_stage_number != $(("$release_stage_number" + 1)) ]]; then
echo "Error: release stage numbers should go in sequence"
exit 1;
fi
else
if [[ $(("$release_subversion" + 1)) != $next_version_subversion || ($next_version_stage_number != 1) ]]; then
echo "Error: release sub versions should go in sequence"
exit 1;
fi
fi
17 changes: 0 additions & 17 deletions .github/workflows/release-notes.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit 22bfe5a

Please sign in to comment.