Skip to content

Commit

Permalink
Removed all symlink specific checks
Browse files Browse the repository at this point in the history
  • Loading branch information
barshaul committed Jun 29, 2024
1 parent dc87537 commit a29be70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 80 deletions.
53 changes: 0 additions & 53 deletions .github/workflows/compare-versions/action.yml

This file was deleted.

29 changes: 2 additions & 27 deletions .github/workflows/install-valkey/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,40 +61,15 @@ runs:
fi
echo 'export PATH=/usr/local/bin:$PATH' >>~/.bash_profile
- name: Check if the current version is a Valkey release
id: is_valkey_release
uses: ./.github/workflows/compare-versions
with:
# Checks if the current tested version is a Valkey release (>= 7.2.5)
version1: ${{ inputs.engine-version }}
version2: ${{ env.VALKEY_MIN_VERSION }}

- name: Verify Valkey installation and symlinks
shell: bash
run: |
# In Valkey releases, the engine is built with symlinks from valkey-server and valkey-cli
# to redis-server and redis-cli. This step ensures that the engine is properly installed
# with the expected version and that Valkey symlinks are correctly created.
IS_VALKEY=${{ steps.is_valkey_release.outputs.result }}
EXPECTED_VERSION=`echo ${{ inputs.engine-version }} | sed -e "s/^redis-//"`
REDIS_SERVER_VER=$(redis-server -v)
if [[ $IS_VALKEY == "true" ]]; then
echo "Is a Valkey version"
# Prior to the minimum Valkey version, only redis-server is installed
VALKEY_SERVER_VER=$(valkey-server -v)
INSTALLED_VER=$VALKEY_SERVER_VER
else
echo "Isn't a Valkey version"
INSTALLED_VER=$REDIS_SERVER_VER
fi
if [[ $IS_VALKEY == true ]] && [[ $VALKEY_SERVER_VER != $REDIS_SERVER_VER ]]; then
echo $'Symlink from valkey to redis failed.' \
$'\nvalkey: '"$VALKEY_SERVER_VER"$', path:'"$(which valkey-server)" \
$'\nredis: '"$REDIS_SERVER_VER"$', path:'"$(which redis-server)"
exit 1
elif [[ $INSTALLED_VER != *"${EXPECTED_VERSION}"* ]]; then
INSTALLED_VER=$(redis-server -v)
if [[ $INSTALLED_VER != *"${EXPECTED_VERSION}"* ]]; then
echo "Wrong version has been installed. Expected: $EXPECTED_VERSION, Installed: $INSTALLED_VER"
exit 1
else
Expand Down

0 comments on commit a29be70

Please sign in to comment.