dkbuild: corriger le support des paramètres sans argument
This commit is contained in:
parent
68a42d0f6a
commit
c36b8fb577
14
TODO.md
14
TODO.md
|
@ -1,16 +1,8 @@
|
|||
# TODO
|
||||
|
||||
dkbuild
|
||||
* commande 'conf' pour lancer une commande en mode configuration
|
||||
* celà permet de définir la version une fois pour toutes
|
||||
* commande 'mvn'
|
||||
* implémenter resetversion?
|
||||
* setversion peut prendre la version depuis un fichier VERSION.txt, pom.xml, la
|
||||
branche git d'un dépôt, etc.
|
||||
* `setversion from-file= from-repo=`
|
||||
* `checkout branch= setversion=` (ça nécessite de revoir le workflow, ou
|
||||
alors ça correspond à resetversion)
|
||||
* peut-être que l'argument pourrait permettre de spécifier comment la
|
||||
version est calculée à partir du dépôt
|
||||
* setversion peut prendre la version depuis la branche git d'un dépôt
|
||||
* un argument permettrait de spécifier comment la version est calculée à
|
||||
partir du dépôt
|
||||
|
||||
-*- coding: utf-8 mode: markdown -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8:noeol:binary
|
25
dkbuild
25
dkbuild
|
@ -1513,7 +1513,7 @@ function define_functions_cmd() {
|
|||
local branch="${DEFAULTS[checkout_branch]}"
|
||||
local develdir="${DEFAULTS[checkout_develdir]}"
|
||||
local develtype="${DEFAULTS[checkout_develtype]}"
|
||||
while [[ "$1" == *=* ]]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
checkout) checkout=1;;
|
||||
checkout=*) checkout="${1#checkout=}";;
|
||||
|
@ -1584,7 +1584,7 @@ function define_functions_cmd() {
|
|||
local copy="${DEFAULTS[copy_copy]-1}"
|
||||
local overwrite="${DEFAULTS[copy_overwrite]}"
|
||||
local gitignore="${DEFAULTS[copy_gitignore]}"
|
||||
while [[ "$1" == *=* ]]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
copy) copy=1;;
|
||||
copy=*) copy="${1#copy=}";;
|
||||
|
@ -1720,7 +1720,7 @@ function define_functions_cmd() {
|
|||
|
||||
local context="${DEFAULTS[genfile_context]}"
|
||||
local sed="${DEFAULTS[genfile_sed]}"
|
||||
while [[ "$1" == *=* ]]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
context=*) context="${1#context=}";;
|
||||
sed=*) sed="${1#sed=}";;
|
||||
|
@ -1755,7 +1755,7 @@ function define_functions_cmd() {
|
|||
|
||||
local context="${DEFAULTS[dockerfile_context]}"
|
||||
local sed="${DEFAULTS[dockerfile_sed]}"
|
||||
while [[ "$1" == *=* ]]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
context=*) context="${1#context=}";;
|
||||
sed=*) sed="${1#sed=}";;
|
||||
|
@ -1818,7 +1818,7 @@ function define_functions_cmd() {
|
|||
[ "$host_mappings" == __UNDEFINED__ ] && host_mappings="${DEFAULTS[docker_host-mappings]}"
|
||||
local images="${DEFAULTS[build_images]}"
|
||||
local push="${DEFAULTS[build_push]}"
|
||||
while [[ "$1" == *=* ]]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
build) build=1;;
|
||||
build=*) build="${1#build=}";;
|
||||
|
@ -1911,7 +1911,7 @@ function define_functions_cmd() {
|
|||
local project_name="${DEFAULTS[cbuild_project-name]}"
|
||||
local no_cache="${DEFAULTS[cbuild_no-cache]}"
|
||||
local pull="${DEFAULTS[cbuild_pull]}"
|
||||
while [[ "$1" == *=* ]]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
files=*) files="${1#files=}";;
|
||||
project-name=*) project_name="${1#project-name=}";;
|
||||
|
@ -1919,7 +1919,8 @@ function define_functions_cmd() {
|
|||
no-cache=*) no_cache="${1#no-cache=}";;
|
||||
pull) pull=1;;
|
||||
pull=*) pull="${1#pull=}";;
|
||||
*) ewarn "cbuild: $1: argument ignoré";;
|
||||
*=*) ewarn "cbuild: $1: argument ignoré";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
@ -2138,7 +2139,7 @@ fi
|
|||
)"
|
||||
fi
|
||||
|
||||
while [[ "$1" == *=* ]]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
args=*) args="${1#args=}";;
|
||||
php=*) php="${1#php=}";;
|
||||
|
@ -2149,7 +2150,8 @@ fi
|
|||
composer=*) composer="${1#composer=}";;
|
||||
setup=*) setup="${1#setup=}";;
|
||||
project-name=*) project_name="${1#project-name=}";;
|
||||
*) ewarn "composer: $1: argument ignoré";;
|
||||
*=*) ewarn "composer: $1: argument ignoré";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
@ -2404,7 +2406,7 @@ cd "$projdir"
|
|||
)"
|
||||
fi
|
||||
|
||||
while [[ "$1" == *=* ]]; do
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
args=*) args="${1#args=}";;
|
||||
java=*) java="${1#java=}";;
|
||||
|
@ -2414,7 +2416,8 @@ cd "$projdir"
|
|||
mvn=*) mvn="${1#mvn=}";;
|
||||
setup=*) setup="${1#setup=}";;
|
||||
project-name=*) project_name="${1#project-name=}";;
|
||||
*) ewarn "mvn: $1: argument ignoré";;
|
||||
*=*) ewarn "mvn: $1: argument ignoré";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue