@@ -60,23 +60,37 @@ runs:
6060 make install
6161 fi
6262 echo 'export PATH=/usr/local/bin:$PATH' >>~/.bash_profile
63+
64+ - name : Clean version
65+ shell : bash
66+ id : cleaned_version
67+ run : |
68+ # Remove any prefix like "redis-"
69+ cleaned_version=$(echo "${{ inputs.engine-version }}" | sed 's/^redis-//')
70+ echo "result=$cleaned_version" >> $GITHUB_OUTPUT
71+ echo "Cleaned version from ${{ inputs.engine-version }} to $cleaned_version"
6372
6473 - name : Check if the current version is a Valkey release
65- id : is_valkey_release
66- uses : ./.github/workflows/compare-versions
74+ uses : madhead/semver-utils@latest
75+ id : version
76+ needs : cleaned_version
6777 with :
68- # Checks if the current tested version is a Valkey release (>= 7.2.5)
69- version1 : ${{ inputs.engine-version }}
70- version2 : ${{ env.VALKEY_MIN_VERSION }}
78+ # Checks if the current tested version is a Valkey release (>= 7.2.5)
79+ version : ${{ steps.cleaned_version.outputs.result }}
80+ compare-to : ${{ env.VALKEY_MIN_VERSION }}
7181
7282 - name : Verify Valkey installation and symlinks
83+ needs : version
7384 shell : bash
7485 run : |
7586 # In Valkey releases, the engine is built with symlinks from valkey-server and valkey-cli
7687 # to redis-server and redis-cli. This step ensures that the engine is properly installed
7788 # with the expected version and that Valkey symlinks are correctly created.
78-
79- IS_VALKEY=${{ steps.is_valkey_release.outputs.result }}
89+ if [[ "${{ steps.version.outputs.comparison-result }}" == "<" ]]; then
90+ IS_VALKEY=false;
91+ else
92+ IS_VALKEY=true;
93+ fi
8094 EXPECTED_VERSION=`echo ${{ inputs.engine-version }} | sed -e "s/^redis-//"`
8195 REDIS_SERVER_VER=$(redis-server -v)
8296 if [[ $IS_VALKEY == "true" ]]; then
0 commit comments