dkbuild: marquer plus d'action comme étant du build
This commit is contained in:
parent
4f7bc3f6bf
commit
2803868e16
13
dkbuild
13
dkbuild
|
@ -1834,6 +1834,7 @@ function define_functions_cmd() {
|
|||
shift
|
||||
done
|
||||
|
||||
[ -n "${DEFAULTS[build_build]-1}" ] || return
|
||||
[ -n "$output" ] || die "genfile: Vous devez spécifier le fichier en sortie"
|
||||
if [ -n "$context" ]; then
|
||||
mkdir -p "$context" || die
|
||||
|
@ -1869,6 +1870,7 @@ function define_functions_cmd() {
|
|||
shift
|
||||
done
|
||||
|
||||
[ -n "${DEFAULTS[build_build]-1}" ] || return
|
||||
[ -n "$DOCKERFILE" ] || DOCKERFILE=Dockerfile
|
||||
DOCKERCONTEXT=.
|
||||
if [ -n "$context" ]; then
|
||||
|
@ -1892,6 +1894,7 @@ function define_functions_cmd() {
|
|||
function add2dockerfile() {
|
||||
edebug "$(qvals "$@")"
|
||||
|
||||
[ -n "${DEFAULTS[build_build]-1}" ] || return
|
||||
[ -n "$DOCKERFILE" ] || return
|
||||
echo "$*" >>"$DOCKERFILE"
|
||||
}
|
||||
|
@ -2039,6 +2042,7 @@ function define_functions_cmd() {
|
|||
function cbuild() {
|
||||
edebug "cbuild $(qvals "$@")"
|
||||
|
||||
local build="${DEFAULTS[build_build]-1}"
|
||||
local files="${DEFAULTS[cbuild_files]}"
|
||||
local project_name="${DEFAULTS[cbuild_project-name]}"
|
||||
local no_cache="${DEFAULTS[cbuild_no-cache]}"
|
||||
|
@ -2057,6 +2061,7 @@ function define_functions_cmd() {
|
|||
shift
|
||||
done
|
||||
|
||||
[ -n "$build" ] || return
|
||||
if [ -n "$files" ]; then
|
||||
eval "files=($files)"
|
||||
else
|
||||
|
@ -2818,12 +2823,16 @@ function build_action() {
|
|||
action=update_src
|
||||
else
|
||||
action=build
|
||||
[ -n "$update_src" ] || update_src=1
|
||||
[ "$update_src" == no ] && update_src=
|
||||
if [ -z "$clean_update" -a -z "$sync_src" -a -z "$build" -a -z "$push_image" ]; then
|
||||
sync_src=1
|
||||
build=1
|
||||
fi
|
||||
if [ -n "$build" ]; then
|
||||
[ -n "$update_src" ] || update_src=1
|
||||
[ "$update_src" == no ] && update_src=
|
||||
else
|
||||
update_src=
|
||||
fi
|
||||
[ "$sync_src" == no ] && sync_src=
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue