Skip to content

Commit

Permalink
release scripts should also not hardcode
Browse files Browse the repository at this point in the history
  • Loading branch information
nazunalika committed Dec 18, 2024
1 parent ba5fe93 commit 723e822
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions sync/beta-release-sync-to-staging.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions sync/lh-release-sync-to-staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

0 comments on commit 723e822

Please sign in to comment.