From c2408f768f5a53390f5fd95beb56b78461f47a4a Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Mon, 13 May 2024 10:51:06 +0400 Subject: [PATCH] =?UTF-8?q?possibilit=C3=A9=20de=20sp=C3=A9cifier=20un=20f?= =?UTF-8?q?ichier=20d'environnement=20pour=20le=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- support/build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/support/build b/support/build index 4bda0bc..9b2ad80 100755 --- a/support/build +++ b/support/build @@ -107,6 +107,7 @@ function build_images() { case "$image" in rundk) local -a args=(--bootstrap) + [ -n "$Config" ] && args+=(--config "$Config") [ -z "$ForceBuild" ] && args+=(--unless-exists) [ -n "$Pull" ] && args+=(--pull) [ -n "$NoCache" ] && args+=(--no-cache) @@ -114,7 +115,8 @@ function build_images() { ;; *) if [ -z "$sourced" ]; then - source "$PROJDIR/$BUILDENV" + [ -n "$Config" ] || Config="$PROJDIR/$BUILDENV" + source "$Config" after_source_buildenv read -a HOST_MAPPINGS <<<"${HOST_MAPPINGS// / }" @@ -127,6 +129,7 @@ function build_images() { } action=build +Config= ForceBuild= Pull= NoCache= @@ -136,6 +139,7 @@ args=( "Construire les images pour DRE" #"usage" --check-only action=none "++Ne faire que la vérification de l'environnement" + -c:,--config:BUILDENV Config= "Spécifier un fichier d'environnement pour le build" -r,--rebuild ForceBuild=1 "Forcer la (re)construction de l'image" -U,--pull Pull=1 "++Forcer le re-téléchargement des images dépendantes" -j,--no-cache NoCache=1 "++Construire l'image en invalidant le cache"