Skip to content
Snippets Groups Projects
Unverified Commit b417a625 authored by Maxim Cournoyer's avatar Maxim Cournoyer
Browse files

build: Streamline the make-packaging-target script output.

Repeating N times the same docstring hampers readability.  Output it
once as the generated file header.

Change-Id: Id5ae8caa35f478919a2233754b17db15a29e2cd0
parent a242f991
No related branches found
No related tags found
No related merge requests found
......@@ -23,11 +23,10 @@
import argparse
target_template = """\
##
## Distro: %(distribution)s
##
template_header = """\
# -*- mode: makefile -*-
# This file was auto-generated by: scripts/make-packaging-target.py.
#
# We don't simply use jami-packaging-distro as the docker image name because
# we want to be able to build multiple versions of the same distro at the
# same time and it could result in race conditions on the machine as we would
......@@ -35,6 +34,13 @@ target_template = """\
#
# This does not impact caching as the docker daemon does not care about the image
# names, just about the contents of the Dockerfile.
"""
target_template = """\
##
## Distro: %(distribution)s
##
PACKAGE_%(distribution)s_DOCKER_IMAGE_NAME:=jami-packaging-%(distribution)s$(RING_PACKAGING_IMAGE_SUFFIX)
PACKAGE_%(distribution)s_DOCKER_IMAGE_FILE:=.docker-image-$(PACKAGE_%(distribution)s_DOCKER_IMAGE_NAME)
DOCKER_EXTRA_ARGS =
......@@ -313,6 +319,7 @@ def parse_args():
def main():
parsed_args = parse_args()
print(template_header)
if parsed_args.generate:
run_generate(parsed_args)
elif parsed_args.generate_all:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment