#! /bin/bash ## Prepare templates for the next branched Fedora verasion ## ## E.g. when the Fedora Rawhide is going to be branched into Fedora 35, ## execute this script as './releng/rawhide-branching.sh' (without ## arguments). set -e topdir=$(git rev-parse --show-toplevel) cd "$topdir/mock-core-configs/etc/mock" for config in fedora-??-x86_64.cfg; do prev_version=$version version=$(echo "$config" | sed -e 's/fedora-//' -e 's/-x86_64.*//') next_version=$(( version + 1 )) done rawhide_plus_one_version=$(( next_version + 1 )) next_gpg=/usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$rawhide_plus_one_version-primary test -e "$next_gpg" || { cat >&2 < $version" echo "Arches: ${architectures[*]}" for arch in "${architectures[@]}"; do # drop the old rawhide symlink rm "fedora-$version-$arch.cfg" # copy old branched config to new branched config, and update releasever cp fedora-{"$prev_version","$version"}-"$arch.cfg" sed -i "s|'$prev_version'|'$version'|" "fedora-$version-$arch.cfg" # create updated rawhide symlink ln -s "fedora-rawhide-$arch.cfg" "fedora-$next_version-$arch.cfg" # stash those updated configs git add "fedora-$next_version-$arch.cfg" "fedora-$version-$arch.cfg" done towncrier_file=$topdir/releng/release-notes-next/fedora-$version-branching.config cat > "$towncrier_file" <