dk: ajout de COMPOSER_ARGS
This commit is contained in:
parent
109797502a
commit
f474657be6
21
dk
21
dk
|
@ -311,6 +311,7 @@ OPTIONS build
|
||||||
app_TYPE= # type de projet (composer|none)
|
app_TYPE= # type de projet (composer|none)
|
||||||
app_AFTER_UPDATE=() # liste de commandes à lancer après le checkout
|
app_AFTER_UPDATE=() # liste de commandes à lancer après le checkout
|
||||||
app_COMPOSER_ACTION= # action projet composer (install|update|none)
|
app_COMPOSER_ACTION= # action projet composer (install|update|none)
|
||||||
|
app_COMPOSER_ARGS=() # arguments de composer install|update
|
||||||
-u, --uu, --update-apps-only
|
-u, --uu, --update-apps-only
|
||||||
Ne faire que la mise à jour depuis les dépôts dépendants.
|
Ne faire que la mise à jour depuis les dépôts dépendants.
|
||||||
-w, --ww, --update-apps-devel
|
-w, --ww, --update-apps-devel
|
||||||
|
@ -366,6 +367,12 @@ VARIABLES de update-apps.conf
|
||||||
vaut 'install' par défaut. Indique ce qu'il faut faire pour un projet de
|
vaut 'install' par défaut. Indique ce qu'il faut faire pour un projet de
|
||||||
type 'composer' après avoir lancé les commandes de AFTER_UPDATE. Les
|
type 'composer' après avoir lancé les commandes de AFTER_UPDATE. Les
|
||||||
directives supportées sont 'install', 'update' et 'none'
|
directives supportées sont 'install', 'update' et 'none'
|
||||||
|
COMPOSER_ARGS
|
||||||
|
options à utiliser avec composer install|update. La valeur par défaut
|
||||||
|
dépend du profil:
|
||||||
|
prod: --no-dev -o
|
||||||
|
test: --no-dev -o
|
||||||
|
autres: (pas d'options)
|
||||||
|
|
||||||
FONCTIONS de update-apps.conf
|
FONCTIONS de update-apps.conf
|
||||||
sqlmig [DESTDIR [SRCDIR [NOFIX]]]
|
sqlmig [DESTDIR [SRCDIR [NOFIX]]]
|
||||||
|
@ -717,9 +724,9 @@ function build_update_apps() {
|
||||||
|
|
||||||
local PRODUCTION DEVELOPMENT
|
local PRODUCTION DEVELOPMENT
|
||||||
case "$PROFILE" in
|
case "$PROFILE" in
|
||||||
prod) PRODUCTION=1; DEVELOPMENT=;;
|
prod) PRODUCTION=1; DEVELOPMENT=; is_defined DEFAULT_COMPOSER_ARGS || DEFAULT_COMPOSER_ARGS=(--no-dev -o);;
|
||||||
test) PRODUCTION=1; DEVELOPMENT=1;;
|
test) PRODUCTION=1; DEVELOPMENT=1; is_defined DEFAULT_COMPOSER_ARGS || DEFAULT_COMPOSER_ARGS=(--no-dev -o);;
|
||||||
devel) PRODUCTION=; DEVELOPMENT=;;
|
devel) PRODUCTION=; DEVELOPMENT=1; is_defined DEFAULT_COMPOSER_ARGS || DEFAULT_COMPOSER_ARGS=();;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
local clean
|
local clean
|
||||||
|
@ -733,6 +740,7 @@ function build_update_apps() {
|
||||||
|
|
||||||
etitle "Mise à jour des dépendances"
|
etitle "Mise à jour des dépendances"
|
||||||
local app var URL SRC DEVEL_SRCDIR DEST NAME have_RSYNC_OPTS RSYNC_OPTS ORIGIN BRANCH TYPE after_update after_updates composer_action
|
local app var URL SRC DEVEL_SRCDIR DEST NAME have_RSYNC_OPTS RSYNC_OPTS ORIGIN BRANCH TYPE after_update after_updates composer_action
|
||||||
|
local -a composer_args
|
||||||
for app in "${APPS[@]}"; do
|
for app in "${APPS[@]}"; do
|
||||||
etitle "$app"
|
etitle "$app"
|
||||||
|
|
||||||
|
@ -902,6 +910,11 @@ function build_update_apps() {
|
||||||
[ -n "$composer_action" ] || { composer_action="${var}_COMPOSER_ACTION"; composer_action="${!composer_action}"; }
|
[ -n "$composer_action" ] || { composer_action="${var}_COMPOSER_ACTION"; composer_action="${!composer_action}"; }
|
||||||
[ -n "$composer_action" ] || composer_action="$DEFAULT_COMPOSER_ACTION"
|
[ -n "$composer_action" ] || composer_action="$DEFAULT_COMPOSER_ACTION"
|
||||||
|
|
||||||
|
composer_args="${var}_${PROFILE}_COMPOSER_ARGS"
|
||||||
|
is_defined "$composer_args" || composer_args="${var}_COMPOSER_ARGS"
|
||||||
|
is_defined "$composer_args" || composer_args="DEFAULT_COMPOSER_ARGS"
|
||||||
|
composer_args="${composer_args}[@]"; composer_args=("${!composer_args}")
|
||||||
|
|
||||||
if [ -z "$BUILD_UPDATE_DEVEL" ]; then
|
if [ -z "$BUILD_UPDATE_DEVEL" ]; then
|
||||||
case "${composer_action:-install}" in
|
case "${composer_action:-install}" in
|
||||||
i|install) composer_action=install;;
|
i|install) composer_action=install;;
|
||||||
|
@ -913,7 +926,7 @@ function build_update_apps() {
|
||||||
setx cwd=pwd
|
setx cwd=pwd
|
||||||
cd "$DEST"
|
cd "$DEST"
|
||||||
estep "Installation des dépendances composer"
|
estep "Installation des dépendances composer"
|
||||||
auto_composer "$composer_action" ${PRODUCTION:+--no-dev -o} || { eend; return 1; }
|
auto_composer "$composer_action" "${composer_args[@]}" || { eend; return 1; }
|
||||||
cd "$cwd"
|
cd "$cwd"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue