From 723e822464e36168669c5676bb86615fc06a30c7 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Tue, 17 Dec 2024 23:08:06 -0700 Subject: [PATCH] release scripts should also not hardcode --- sync/beta-release-sync-to-staging.sh | 9 ++++----- sync/lh-release-sync-to-staging.sh | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sync/beta-release-sync-to-staging.sh b/sync/beta-release-sync-to-staging.sh index 9ca733f..4d6491f 100644 --- a/sync/beta-release-sync-to-staging.sh +++ b/sync/beta-release-sync-to-staging.sh @@ -1,7 +1,6 @@ #!/bin/bash # Performs a full on sync of a minor release, directories and all. It calls the # other scripts in this directory to assist where necessary. -# Note that this is EL8 specific # # Source common variables # shellcheck disable=SC2046,1091,1090 @@ -12,8 +11,8 @@ source $(dirname "$0")/common # Major Version (eg, 8) MAJ=${RLVER} -if [[ "${RLVER}" -ne "8" ]]; then - echo "This is only used for Rocky Linux 8 releases." +if [[ "${RLVER}" -eq "9" ]]; then + echo "Invalid release" exit 1 fi @@ -85,8 +84,8 @@ done # Change Symlink if required echo "Setting symlink to ${REV}" pushd "${STAGING_ROOT}/${CATEGORY_STUB}" || exit -/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/8-BETA" -ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" 8-BETA +/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/${MAJ}-BETA" +ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" "${MAJ}-BETA" echo "Attempting hard link" perform_hardlink "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" popd || exit diff --git a/sync/lh-release-sync-to-staging.sh b/sync/lh-release-sync-to-staging.sh index be359ec..05250a6 100644 --- a/sync/lh-release-sync-to-staging.sh +++ b/sync/lh-release-sync-to-staging.sh @@ -12,8 +12,8 @@ source $(dirname "$0")/common # Major Version (eg, 8) MAJ=${RLVER} -if [[ "${RLVER}" -ne "8" ]]; then - echo "This is only used for Rocky Linux 8 releases." +if [[ "${RLVER}" -eq "9" ]]; then + echo "Invalid release" exit 1 fi @@ -85,8 +85,8 @@ done # Change Symlink if required echo "Setting symlink to ${REV}" pushd "${STAGING_ROOT}/${CATEGORY_STUB}" || exit -/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/8-LookAhead" -ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" 8-LookAhead +/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/${MAJ}-LookAhead" +ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" "${MAJ}-LookAhead" echo "Attempting hard link" perform_hardlink "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" popd || exit