From 607b64357e58e7f49163b60cd47b8fe6a962d372 Mon Sep 17 00:00:00 2001 From: Vladimir Slavik Date: Tue, 23 Aug 2022 17:38:18 +0200 Subject: [PATCH] Templatize branch-config (#infra) --- branch-config.mk | 8 +++++++ branch-config.mk.j2 | 51 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 branch-config.mk.j2 diff --git a/branch-config.mk b/branch-config.mk index f148475a46d..48c374ae4fa 100644 --- a/branch-config.mk +++ b/branch-config.mk @@ -1,3 +1,10 @@ +# ====================================== +# WARNING! +# THIS FILE IS GENERATED FROM A TEMPLATE +# DO NOT EDIT THIS FILE MANUALLY! +# ====================================== +# The template is located in: branch-config.mk.j2 + # Makefile include for branch specific configuration settings # # Copyright (C) 2020 Red Hat, Inc. @@ -32,3 +39,4 @@ BASE_CONTAINER ?= registry.fedoraproject.org/fedora:rawhide # COPR repo for use in container builds. # Can be @rhinstaller/Anaconda for master, or @rhinstaller/Anaconda-devel for branched Fedora. COPR_REPO ?= \@rhinstaller/Anaconda + diff --git a/branch-config.mk.j2 b/branch-config.mk.j2 new file mode 100644 index 00000000000..d0e3f5b766e --- /dev/null +++ b/branch-config.mk.j2 @@ -0,0 +1,51 @@ +# Makefile include for branch specific configuration settings +# +# Copyright (C) 2020 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . +# +# Store a branch specific configuration here to avoid dealing with +# conflicts on multiple places. + +{% if distro_name == "fedora" and distro_release == "rawhide" %} + +# Name of the expected current git branch. +# This could be master, fXX-devel, fXX-release, rhelX-branch, rhel-X ... +GIT_BRANCH ?= master + +# Directory for this anaconda branch in anaconda-l10n repository. This could be master, fXX, rhel-8 etc. +L10N_DIR ?= master + +# Base container for our containers. +BASE_CONTAINER ?= registry.fedoraproject.org/fedora:rawhide + +# COPR repo for use in container builds. +# Can be @rhinstaller/Anaconda for master, or @rhinstaller/Anaconda-devel for branched Fedora. +COPR_REPO ?= \@rhinstaller/Anaconda + +{% elif distro_name == "fedora" %} + +GIT_BRANCH ?= f{$ distro_release $}-release +L10N_DIR ?= f{$ distro_release $} +BASE_CONTAINER ?= registry.fedoraproject.org/fedora:{$ distro_release $} +COPR_REPO ?= \@rhinstaller/Anaconda-devel + +{% elif distro_name == "rhel" %} + +GIT_BRANCH ?= rhel-{$ distro_release $} +L10N_DIR ?= rhel-{$ distro_release $} +BASE_CONTAINER ?= registry-proxy.engineering.redhat.com/rh-osbs/ubi{$ distro_release $}:latest +COPR_REPO ?= rhinstaller-group/Anaconda + +{% endif %}