From 8e99616a43133436ef1bd91eb1cff61b803bb51f Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 9 Sep 2024 12:24:04 +0200 Subject: [PATCH] move stage local base to a setting --- settings | 1 + sign_stage_rpms | 6 ++---- upload_stage_rpms | 2 +- verify_stage_sigs | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/settings b/settings index 9890722..272b8ea 100644 --- a/settings +++ b/settings @@ -68,6 +68,7 @@ TAR_PROJECTS="" RPM_PACKAGES=() PACKAGING_PR=${PACKAGING_PR:-true} GPG_EXPIRE="1y" +STAGE_LOCAL_BASE="tmp/$PROJECT/$VERSION" load_settings diff --git a/sign_stage_rpms b/sign_stage_rpms index 7354de8..5aa3fb1 100755 --- a/sign_stage_rpms +++ b/sign_stage_rpms @@ -5,14 +5,12 @@ set -e . settings for os in $OSES; do - BASE="tmp/$PROJECT/$VERSION/$os" - for arch in $ARCHES; do - UNSIGNED_RPMS=$(./list_unsigned_rpms "$BASE/$arch" "$HALFGPGKEY") + UNSIGNED_RPMS=$(./list_unsigned_rpms "$STAGE_LOCAL_BASE/$os/$arch" "$HALFGPGKEY") if [[ -n "$UNSIGNED_RPMS" ]]; then echo "$UNSIGNED_RPMS" | xargs ./sign_rpms - createrepo_c --general-compress-type gz --database --update "$BASE/$arch" + createrepo_c --general-compress-type gz --database --update "$STAGE_LOCAL_BASE/$os/$arch" fi done done diff --git a/upload_stage_rpms b/upload_stage_rpms index 3ad1a37..333c9ba 100755 --- a/upload_stage_rpms +++ b/upload_stage_rpms @@ -9,4 +9,4 @@ if [[ "${VERSION}" != "nightly" ]]; then ./verify_stage_sigs fi -rsync --checksum --times --perms --recursive --links --verbose --partial --one-file-system --delete-after "tmp/$PROJECT/$VERSION/" "$USER@$HOST:rsync_cache/$PROJECT/$VERSION/" +rsync --checksum --times --perms --recursive --links --verbose --partial --one-file-system --delete-after "${STAGE_LOCAL_BASE}/" "$USER@$HOST:rsync_cache/$PROJECT/$VERSION/" diff --git a/verify_stage_sigs b/verify_stage_sigs index a164637..b9ba1f3 100755 --- a/verify_stage_sigs +++ b/verify_stage_sigs @@ -7,10 +7,9 @@ set -e EXIT_CODE=0 for os in $OSES; do - BASE="tmp/$PROJECT/$VERSION/$os" for arch in $ARCHES; do - UNSIGNED_RPMS=$(./list_unsigned_rpms "$BASE/$arch" "$HALFGPGKEY") + UNSIGNED_RPMS=$(./list_unsigned_rpms "$STAGE_LOCAL_BASE/$os/$arch" "$HALFGPGKEY") if [[ -n "$UNSIGNED_RPMS" ]]; then echo "$UNSIGNED_RPMS"