Skip to content

Commit 723e822

Browse files
committed
release scripts should also not hardcode
1 parent ba5fe93 commit 723e822

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

sync/beta-release-sync-to-staging.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22
# Performs a full on sync of a minor release, directories and all. It calls the
33
# other scripts in this directory to assist where necessary.
4-
# Note that this is EL8 specific
54
#
65
# Source common variables
76
# shellcheck disable=SC2046,1091,1090
@@ -12,8 +11,8 @@ source $(dirname "$0")/common
1211
# Major Version (eg, 8)
1312
MAJ=${RLVER}
1413

15-
if [[ "${RLVER}" -ne "8" ]]; then
16-
echo "This is only used for Rocky Linux 8 releases."
14+
if [[ "${RLVER}" -eq "9" ]]; then
15+
echo "Invalid release"
1716
exit 1
1817
fi
1918

@@ -85,8 +84,8 @@ done
8584
# Change Symlink if required
8685
echo "Setting symlink to ${REV}"
8786
pushd "${STAGING_ROOT}/${CATEGORY_STUB}" || exit
88-
/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/8-BETA"
89-
ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" 8-BETA
87+
/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/${MAJ}-BETA"
88+
ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" "${MAJ}-BETA"
9089
echo "Attempting hard link"
9190
perform_hardlink "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}"
9291
popd || exit

sync/lh-release-sync-to-staging.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ source $(dirname "$0")/common
1212
# Major Version (eg, 8)
1313
MAJ=${RLVER}
1414

15-
if [[ "${RLVER}" -ne "8" ]]; then
16-
echo "This is only used for Rocky Linux 8 releases."
15+
if [[ "${RLVER}" -eq "9" ]]; then
16+
echo "Invalid release"
1717
exit 1
1818
fi
1919

@@ -85,8 +85,8 @@ done
8585
# Change Symlink if required
8686
echo "Setting symlink to ${REV}"
8787
pushd "${STAGING_ROOT}/${CATEGORY_STUB}" || exit
88-
/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/8-LookAhead"
89-
ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" 8-LookAhead
88+
/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/${MAJ}-LookAhead"
89+
ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" "${MAJ}-LookAhead"
9090
echo "Attempting hard link"
9191
perform_hardlink "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}"
9292
popd || exit

0 commit comments

Comments
 (0)