Skip to content

Commit

Permalink
Merge pull request #10 from hidakatsuya/fix-problem-with-min-version-…
Browse files Browse the repository at this point in the history
…checks

Fix problems with minimum version checks
  • Loading branch information
hidakatsuya authored Jul 14, 2024
2 parents 6757c05 + 32db9e9 commit 44459ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ runs:

- name: Check if the Redmine version is supported
run: |
if [ $redmine_version_number -lt $MINIUMUM_SUPPORTED_REDMINE_VERSION ]; then
if [ $REDMINE_MAJOR_VERSION_NUMNER -lt $MINIUMUM_SUPPORTED_REDMINE_VERSION ]; then
echo "Redmine version $REDMINE_VERSION is not supported."
exit 1
fi
shell: bash
env:
MINIUMUM_SUPPORTED_REDMINE_VERSION: "420" # v4.2.0
MINIUMUM_SUPPORTED_REDMINE_VERSION: "402" # v4.2.x

- name: Set up base environment
run: |
Expand Down
8 changes: 4 additions & 4 deletions scripts/set-version-envs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version_tiny=$(grep -oE 'TINY *= *[0-9]+' $file | awk 'NR==1 {print $3}')
version_branch=$(grep -oE 'BRANCH *= *'\''.+?' $file | awk -F"'" 'NR==1 {print $2}')

redmine_version=$version_major.$version_minor.$version_tiny.$version_branch
redmine_version_number=$version_major$version_minor$version_tiny
redmine_major_version_number=$version_major$(printf "%02d" $version_minor)

# v5.1.3.stable -> 5.1.3.stable
echo "REDMINE_VERSION=$redmine_version" >> $GITHUB_ENV
Expand All @@ -24,9 +24,9 @@ echo "REDMINE_VERSION_TINY=$version_tiny" >> $GITHUB_ENV
# v5.1.3.stable -> stable
echo "REDMINE_VERSION_BRANCH=$version_branch" >> $GITHUB_ENV

# v5.1.3.stable -> 513
echo "REDMINE_VERSION_NUMNER=$redmine_version_number" >> $GITHUB_ENV
# v5.1.3.stable -> 501
echo "REDMINE_MAJOR_VERSION_NUMNER=$redmine_major_version_number" >> $GITHUB_ENV

# Output version information
echo "Redmine Version: $redmine_version"
echo "Redmine Version Number: $redmine_version_number"
echo "Redmine Major Version Number: $redmine_major_version_number"

0 comments on commit 44459ce

Please sign in to comment.