rundk tient compte de $RUNDK_FORCE_BUILDENV
This commit is contained in:
parent
5e095a5579
commit
a78d93e510
|
@ -106,8 +106,8 @@ function build_images() {
|
|||
for image in "$@"; do
|
||||
case "$image" in
|
||||
rundk)
|
||||
[ -n "$Config" ] && export RUNDK_FORCE_BUILDENV="$Config"
|
||||
local -a args=(--bootstrap)
|
||||
[ -n "$Config" ] && args+=(--config "$Config")
|
||||
[ -z "$ForceBuild" ] && args+=(--unless-exists)
|
||||
[ -n "$Pull" ] && args+=(--pull)
|
||||
[ -n "$NoCache" ] && args+=(--no-cache)
|
||||
|
@ -148,9 +148,14 @@ args=(
|
|||
)
|
||||
parse_args "$@"; set -- "${args[@]}"
|
||||
|
||||
[ -n "$Config" ] && setx Config=abspath "$Config"
|
||||
|
||||
if [ -n "$Config" ]; then
|
||||
setx Config=abspath "$Config"
|
||||
# pas de vérification d'environnement si on spécifie Config
|
||||
# ne pas oublier d'implémenter un traitement spécifique si build_check_env()
|
||||
# contient d'autres vérifications
|
||||
else
|
||||
build_check_env || die
|
||||
fi
|
||||
[ "$action" == none ] && exit 0
|
||||
|
||||
case "$action" in
|
||||
|
|
|
@ -185,7 +185,10 @@ if [ -z "$_RUNDK_IN_DOCKER" ]; then
|
|||
|
||||
IMAGE=
|
||||
if [ -z "$bootstrap" ]; then
|
||||
if [ -n "$BUILDENV" -a -f "$PROJDIR/$BUILDENV" ]; then
|
||||
if [ -n "$RUNDK_FORCE_BUILDENV" ]; then
|
||||
source "$RUNDK_FORCE_BUILDENV" || exit 1
|
||||
after_source_buildenv
|
||||
elif [ -n "$BUILDENV" -a -f "$PROJDIR/$BUILDENV" ]; then
|
||||
source "$PROJDIR/$BUILDENV" || exit 1
|
||||
after_source_buildenv
|
||||
elif [ -n "$BUILDENV0" -a -f "$PROJDIR/$BUILDENV0" ]; then
|
||||
|
@ -215,7 +218,9 @@ if [ -z "$_RUNDK_IN_DOCKER" ]; then
|
|||
args="$(getopt -n "$MYNAME" -o "$SOPTS" -l "$LOPTS" -- "$@")" || exit 1; eval "set -- $args"
|
||||
|
||||
Dist=
|
||||
if [ -n "$BUILDENV" -a -f "$PROJDIR/$BUILDENV" ]; then
|
||||
if [ -n "$RUNDK_FORCE_BUILDENV" ]; then
|
||||
Config="$RUNDK_FORCE_BUILDENV"
|
||||
elif [ -n "$BUILDENV" -a -f "$PROJDIR/$BUILDENV" ]; then
|
||||
Config="$PROJDIR/$BUILDENV"
|
||||
elif [ -n "$BUILDENV0" -a -f "$PROJDIR/$BUILDENV0" ]; then
|
||||
Config="$PROJDIR/$BUILDENV0"
|
||||
|
|
Loading…
Reference in New Issue