Skip to content

Commit

Permalink
Templatize branch-config (#infra)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirSlavik committed Aug 29, 2022
1 parent 1b871d3 commit 607b643
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
8 changes: 8 additions & 0 deletions branch-config.mk
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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

51 changes: 51 additions & 0 deletions branch-config.mk.j2
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
#
# 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 %}

0 comments on commit 607b643

Please sign in to comment.