Skip to content

Commit

Permalink
fix installing head -n1 version
Browse files Browse the repository at this point in the history
when trying to install version 5.2.1, it installed the latest version of
5.2.1x (5.2.15) due to `head -n1`

fixing it by adding -w (match only whole word)
  • Loading branch information
Annamikhlin committed Feb 19, 2024
1 parent 9cb84a1 commit eee3a00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ setup_install() {
get_full_version() {
PATCH_VERSION=$(echo $SCYLLA_VERSION | awk -v FS='.' '{print $3}')
if [ -n "$PATCH_VERSION" ] && [ -z "$DEFAULT_SCYLLA_VERSION" ] || [[ $SCYLLA_VERSION == *rc* ]]; then
FULL_SCYLLA_VERSION=$(apt-cache madison ${SCYLLA_PRODUCT} | grep -F $SCYLLA_VERSION | cut -d'|' -f 2 | sed 's/[[:space:]]//g' | head -n1)
FULL_SCYLLA_VERSION=$(apt-cache madison ${SCYLLA_PRODUCT} | grep -F -w $SCYLLA_VERSION | cut -d'|' -f 2 | sed 's/[[:space:]]//g')
PACKAGES_LIST=',-server,-jmx,-tools,-tools-core,-kernel-conf,-node-exporter,-conf,-python3'
if ([[ $SCYLLA_PRODUCT =~ "scylla" ]] && [[ ${SCYLLA_VERSION%.*} > "5.2" ]]) || ([[ $SCYLLA_PRODUCT =~ "enterprise" ]] && [[ ${SCYLLA_VERSION%%.*} > "2023" ]]); then
PACKAGES_LIST="${PACKAGES_LIST},-cqlsh"
Expand Down

0 comments on commit eee3a00

Please sign in to comment.