diff --git a/sync/common b/sync/common index 33c0852..0c50eac 100644 --- a/sync/common +++ b/sync/common @@ -15,9 +15,14 @@ if [ -z "$RLVER" ]; then export RLVER=8 fi +if [ -z "$RLREL" ]; then + export RLREL=stable +fi + # Override: Not Allowed STAGING_ROOT="/mnt/repos-staging" PRODUCTION_ROOT="/mnt/repos-production" +COMPOSE_ROOT="/mnt/compose" # Override: Not Allowed # relative to ${ENV}_ROOT diff --git a/sync/common_8 b/sync/common_8 index a751404..f35ac55 100644 --- a/sync/common_8 +++ b/sync/common_8 @@ -1,13 +1,29 @@ # To be sourced by scripts to use # Revision must always start with a major number -REVISION=8.7 - -MAJOR="${REVISION:0:1}" -MINOR="${REVISION:2:1}" - -# comment or blank if needed -APPEND_TO_DIR="-RC1" +case "${RLREL}" in + stable) + REVISION=8.7 + MAJOR="${REVISION:0:1}" + MINOR="${REVISION:2:1}" + APPEND_TO_DIR="-RC1" + ;; + beta) + REVISION=8.8 + MAJOR="${REVISION:0:1}" + MINOR="${REVISION:2:1}" + APPEND_TO_DIR="-BETA" + ;; + lh) + REVISION=8.8 + MAJOR="${REVISION:0:1}" + MINOR="${REVISION:2:1}" + APPEND_TO_DIR="-LookAhead" + ;; + *) + echo "option no recognized" + ;; +esac STAGING_ROOT="/mnt/repos-staging" PRODUCTION_ROOT="/mnt/repos-production" @@ -15,6 +31,7 @@ PRODUCTION_ROOT="/mnt/repos-production" # relative to ${ENV}_ROOT CATEGORY_STUB="mirror/pub/rocky" RELEASE_DIR="${CATEGORY_STUB}/${REVISION}${APPEND_TO_DIR}" +RELEASE_COMPOSE_ROOT="${COMPOSE_ROOT}/${MAJ}${APPEND_TO_DIR}" # Set all repos that have no comps/groups associated with them. This is even in # cases where repos will not be available by normal means. It's just for diff --git a/sync/common_9 b/sync/common_9 index 0b352eb..5e74d22 100644 --- a/sync/common_9 +++ b/sync/common_9 @@ -1,22 +1,39 @@ # To be sourced by scripts to use # Revision must always start with a major number -REVISION=9.1 +case "${RLREL}" in + stable) + REVISION=9.1 + MAJOR="${REVISION:0:1}" + MINOR="${REVISION:2:1}" + APPEND_TO_DIR="-RC4" + ;; + beta) + REVISION=9.2 + MAJOR="${REVISION:0:1}" + MINOR="${REVISION:2:1}" + APPEND_TO_DIR="-BETA" + ;; + lh) + REVISION=9.2 + MAJOR="${REVISION:0:1}" + MINOR="${REVISION:2:1}" + APPEND_TO_DIR="-LookAhead" + ;; + *) + echo "option no recognized" + ;; +esac ARCHES=(x86_64 aarch64 ppc64le s390x) -MAJOR="${REVISION:0:1}" -MINOR="${REVISION:2:1}" - -# comment or blank if needed -APPEND_TO_DIR="-RC4" - STAGING_ROOT="/mnt/repos-staging" PRODUCTION_ROOT="/mnt/repos-production" # relative to ${ENV}_ROOT CATEGORY_STUB="mirror/pub/rocky" RELEASE_DIR="${CATEGORY_STUB}/${REVISION}${APPEND_TO_DIR}" +RELEASE_COMPOSE_ROOT="${COMPOSE_ROOT}/${MAJ}" # Set all repos that have no comps/groups associated with them. This is even in # cases where repos will not be available by normal means. It's just for diff --git a/sync/sync-to-staging.delete.sh b/sync/sync-to-staging.delete.sh index de1be80..31bae76 100644 --- a/sync/sync-to-staging.delete.sh +++ b/sync/sync-to-staging.delete.sh @@ -14,7 +14,7 @@ MAJ=${RLVER} # Short name (eg, NFV, extras, Rocky, gluster9) SHORT=${1} -cd "/mnt/compose/${MAJ}/latest-${SHORT}-${MAJ}/compose" || { echo "Failed to change directory"; ret_val=1; exit 1; } +cd "${RELEASE_COMPOSE_ROOT}/latest-${SHORT}-${MAJ}/compose" || { echo "Failed to change directory"; ret_val=1; exit 1; } ret_val=$? if [ $ret_val -eq "0" ]; then diff --git a/sync/sync-to-staging.sh b/sync/sync-to-staging.sh index dc14ba2..4ac606d 100644 --- a/sync/sync-to-staging.sh +++ b/sync/sync-to-staging.sh @@ -14,7 +14,7 @@ MAJ=${RLVER} # Short name (eg, NFV, extras, Rocky, gluster9) SHORT=${1} -cd "/mnt/compose/${MAJ}/latest-${SHORT}-${MAJ}/compose" || { echo "Failed to change directory"; ret_val=1; exit 1; } +cd "${RELEASE_COMPOSE_ROOT}/latest-${SHORT}-${MAJ}/compose" || { echo "Failed to change directory"; ret_val=1; exit 1; } ret_val=$? if [ $ret_val -eq "0" ]; then