s'assurer que NDIST est calculé

This commit is contained in:
Jephté Clain 2024-05-12 22:09:50 +04:00
parent 1e481044eb
commit e78becb92a
2 changed files with 7 additions and 1 deletions

View File

@ -115,6 +115,7 @@ function build_images() {
*)
if [ -z "$sourced" ]; then
source "$PROJDIR/$BUILDENV"
after_source_buildenv
read -a HOST_MAPPINGS <<<"${HOST_MAPPINGS//
/ }"
sourced=1

View File

@ -33,7 +33,9 @@ fi
[ "$BUILDENV0" == none ] && BUILDENV0=
[ "$BUILDENV" == none ] && BUILDENV=
NDIST="${DIST#d}"
function after_source_buildenv() {
NDIST="${DIST#d}"
}
[ -n "$_sourced" ] && return 0
@ -184,8 +186,10 @@ if [ -z "$_RUNDK_IN_DOCKER" ]; then
if [ -z "$bootstrap" ]; then
if [ -n "$BUILDENV" -a -f "$PROJDIR/$BUILDENV" ]; then
source "$PROJDIR/$BUILDENV" || exit 1
after_source_buildenv
elif [ -n "$BUILDENV0" -a -f "$PROJDIR/$BUILDENV0" ]; then
source "$PROJDIR/$BUILDENV0" || exit 1
after_source_buildenv
fi
if [ -z "$IMAGE" ]; then
[ -n "$PRIVAREG" ] && IMAGE="$PRIVAREG/$IMAGENAME:$DIST" || IMAGE="$REGISTRY/$IMAGENAME:$DIST"
@ -273,6 +277,7 @@ OPTIONS
[ "$Config" == none ] && Config=
if [ -n "$Config" ]; then
source "$Config" || exit 1
after_source_buildenv
fi
[ -n "$Dist" ] && DIST="$Dist"
if [ -z "$IMAGE" ]; then