#!/bin/bash # Build every package of one tier from build-order.txt for a single mock chroot # and upload the resulting RPMs to the Forgejo package registry. # # Usage: ci/build-tier.sh # # Environment: # FORGEJO_URL, FORGEJO_OWNER, FORGEJO_TOKEN upload target (upload is skipped # when FORGEJO_TOKEN is empty) set -euo pipefail TIER=${1:?tier name, e.g. tier1} MOCK_CONFIG=${2:?mock config, e.g. alma+epel-10-x86_64} REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" ORDER_FILE="$REPO_DIR/build-order.txt" RESULT_DIR="${RESULT_DIR:-$HOME/mock-results}" packages() { sed -n "/^\[$TIER\]$/,/^\[/p" "$ORDER_FILE" | grep -v '^\[' | grep -v '^#' | grep -v '^$' } write_mock_config() { cat > /etc/mock/sonicde.cfg <