From 94878899b4524d27860415c9977e46949cae7b90 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sep 09 2024 23:02:41 +0000 Subject: release-candidate.sh: fix release version / label handling A compose 'label', as defined by productmd, does not contain the release version. It has to be something like "Beta-1.3" or "RC-3.1". Instead of having the script require a string that isn't a label, but calling it a label and passing it as one to pungi-fedora (which rejects it), have the script require separate arguments for the release number and the label, and use them appropriately. Signed-off-by: Adam Williamson --- diff --git a/release-candidate.sh b/release-candidate.sh index 2da0876..6e86853 100755 --- a/release-candidate.sh +++ b/release-candidate.sh @@ -3,14 +3,15 @@ # Relevant SOPs: # Beta RC: https://docs.fedoraproject.org/en-US/infra/release_guide/beta_RC_compose/ # Final RC: https://docs.fedoraproject.org/en-US/infra/release_guide/final_RC_compose/ +# The first argument is the release version (e.g. 41). +# The second argument is the compose label (e.g. Beta-1.3). # It can be run in dry mode by adding the -d option. # The -d option is a POSITIONAL argument and must be added AFTER the label. -# Example usage: `./release-candidate.sh 39_Beta-1.3 -d` +# Example usage: `./release-candidate.sh 42 Beta-1.3 -d` export LC_ALL=C -# Remove the label from arguments. It gets special treatment. -# Other arguments to the script are passed to `pungi-koji` directly. -LABEL=$1 -shift +FEDORA_VERSION=$1 +LABEL=$2 + # Find out which config file to use based on the label. if [[ "$LABEL" = *"Beta"* ]]; then @@ -28,8 +29,6 @@ else exit 1 fi -# Extract the Fedora version from the label. Example label: 39_RC-1.1 -FEDORA_VERSION="${LABEL%%_*}" TARGET_DIR="/mnt/koji/compose/${FEDORA_VERSION}" MD_ARCHIVE_DIR="/mnt/koji/compose/metadata-archive" SERIES_DIR="${MD_ARCHIVE_DIR}/series" @@ -44,7 +43,7 @@ TMPDIR=$(mktemp -d /tmp/fedoraRC."${DATE}".XXXX) RELEASE="f${FEDORA_VERSION}" SHORT="Fedora" RSYNCPREFIX="sudo -u ftpsync" -RSYNCTARGET="/pub/alt/stage/${LABEL}" +RSYNCTARGET="/pub/alt/stage/${FEDORA_VERSION}_${LABEL}" # Uncomment and edit for resuming a failed compose, e.g. "COMPOSE_ID="Fedora-23-20150530.n.0" # COMPOSE_ID="Fedora-23-20150530.n.0"