Compare commits
No commits in common. "9d5713c1f95e79fa60adb89d96a877bd14d991bc" and "05fd86acc7c1f8e3e1c189f18b7262b5f0766e9f" have entirely different histories.
9d5713c1f9
...
05fd86acc7
@ -1,8 +1,3 @@
|
|||||||
## Version 9.8.0 du 28/04/2020-16:42
|
|
||||||
|
|
||||||
* `e2b2f49` dk: vérifier que le répertoire destination existe avant rsync
|
|
||||||
* `c147a0c` dk: possibilité de spécifier les options de rsync
|
|
||||||
|
|
||||||
## Version 9.7.0 du 17/04/2020-10:20
|
## Version 9.7.0 du 17/04/2020-10:20
|
||||||
|
|
||||||
* `f4f9b69` dk: bug avec la synchro d'un fichier
|
* `f4f9b69` dk: bug avec la synchro d'un fichier
|
||||||
|
@ -1 +1 @@
|
|||||||
9.8.0
|
9.7.0
|
||||||
|
61
dk
61
dk
@ -273,11 +273,8 @@ OPTIONS build
|
|||||||
PROFILE_APPS=() # ou... spécifique au profil 'PROFILE'
|
PROFILE_APPS=() # ou... spécifique au profil 'PROFILE'
|
||||||
app_URL= # url du dépôt
|
app_URL= # url du dépôt
|
||||||
app_DEVEL_SRCDIR= # répertoire source du dépôt en mode devel
|
app_DEVEL_SRCDIR= # répertoire source du dépôt en mode devel
|
||||||
app_SRC= # répertoire/fichier source (si URL='')
|
app_SRC= # répertoire/fichier source (si URL pas renseigné)
|
||||||
app_DEST= # répertoire dans lequel faire le checkout
|
app_DEST= # répertoire dans lequel faire le checkout
|
||||||
# ou destination si synchro avec app_SRC
|
|
||||||
app_RSYNC_OPTS= # options de rsync si synchro (avec app_SRC
|
|
||||||
# ou app_DEVEL_SRCDIR)
|
|
||||||
app_PROFILE_ORIGIN= # origine spécifique au profil 'PROFILE'
|
app_PROFILE_ORIGIN= # origine spécifique au profil 'PROFILE'
|
||||||
app_ORIGIN= # ou... origine par défaut de la branche
|
app_ORIGIN= # ou... origine par défaut de la branche
|
||||||
app_PROFILE_BRANCH= # branche spécifique au profil 'PROFILE'
|
app_PROFILE_BRANCH= # branche spécifique au profil 'PROFILE'
|
||||||
@ -327,11 +324,8 @@ VARIABLES de update-apps.conf
|
|||||||
projet. Les variables suivantes sont disponibles:
|
projet. Les variables suivantes sont disponibles:
|
||||||
URL= # url du dépôt
|
URL= # url du dépôt
|
||||||
DEVEL_SRCDIR= # répertoire source en mode devel
|
DEVEL_SRCDIR= # répertoire source en mode devel
|
||||||
SRC= # répertoire/fichier source (si URL='')
|
SRC= # répertoire/fichier source (si URL pas renseigné)
|
||||||
DEST= # répertoire dans lequel faire le checkout
|
DEST= # répertoire dans lequel faire le checkout
|
||||||
# ou destination si URL=''
|
|
||||||
RSYNC_OPTS= # options de rsync si synchro avec SRC ou
|
|
||||||
# DEVEL_SRCDIR
|
|
||||||
ORIGIN= # origine de la branche
|
ORIGIN= # origine de la branche
|
||||||
BRANCH= # branche sélectionnée dans le dépôt
|
BRANCH= # branche sélectionnée dans le dépôt
|
||||||
TYPE= # type de projet (composer|none)
|
TYPE= # type de projet (composer|none)
|
||||||
@ -705,7 +699,7 @@ function build_update_apps() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
etitle "Mise à jour des dépendances"
|
etitle "Mise à jour des dépendances"
|
||||||
local app var URL SRC DEVEL_SRCDIR DEST have_RSYNC_OPTS RSYNC_OPTS ORIGIN BRANCH TYPE after_update after_updates composer_action
|
local app var URL SRC DEVEL_SRCDIR DEST ORIGIN BRANCH TYPE after_update after_updates composer_action
|
||||||
for app in "${APPS[@]}"; do
|
for app in "${APPS[@]}"; do
|
||||||
etitle "$app"
|
etitle "$app"
|
||||||
|
|
||||||
@ -726,14 +720,6 @@ function build_update_apps() {
|
|||||||
DEST="${var}_DEST"; DEST="${!DEST}"
|
DEST="${var}_DEST"; DEST="${!DEST}"
|
||||||
[ -n "$DEST" ] || DEST="$app/b"
|
[ -n "$DEST" ] || DEST="$app/b"
|
||||||
|
|
||||||
if is_defined "${var}_RSYNC_OPTS"; then
|
|
||||||
have_RSYNC_OPTS=1
|
|
||||||
RSYNC_OPTS="${var}_RSYNC_OPTS[@]"; RSYNC_OPTS=("${!RSYNC_OPTS}")
|
|
||||||
else
|
|
||||||
have_RSYNC_OPTS=
|
|
||||||
RSYNC_OPTS=()
|
|
||||||
fi
|
|
||||||
|
|
||||||
ORIGIN="${var}_${PROFILE}_ORIGIN"; ORIGIN="${!ORIGIN}"
|
ORIGIN="${var}_${PROFILE}_ORIGIN"; ORIGIN="${!ORIGIN}"
|
||||||
[ -n "$ORIGIN" ] || { ORIGIN="${var}_ORIGIN"; ORIGIN="${!ORIGIN}"; }
|
[ -n "$ORIGIN" ] || { ORIGIN="${var}_ORIGIN"; ORIGIN="${!ORIGIN}"; }
|
||||||
[ -n "$ORIGIN" ] || ORIGIN="$DEFAULT_ORIGIN"
|
[ -n "$ORIGIN" ] || ORIGIN="$DEFAULT_ORIGIN"
|
||||||
@ -750,8 +736,7 @@ function build_update_apps() {
|
|||||||
DEST="$DEST/$app"
|
DEST="$DEST/$app"
|
||||||
|
|
||||||
# synchronisation en mode devel
|
# synchronisation en mode devel
|
||||||
[ -n "$have_RSYNC_OPTS" ] || RSYNC_OPTS=(--delete --delete-excluded)
|
local -a rsync_opts; rsync_opts=(-a --delete --exclude .git/ --delete-excluded)
|
||||||
local -a rsync_opts; rsync_opts=(-a --exclude .git/ "${RSYNC_OPTS[@]}")
|
|
||||||
estep "Synchro $DEVEL_SRCDIR --> $DEST"
|
estep "Synchro $DEVEL_SRCDIR --> $DEST"
|
||||||
rsync "${rsync_opts[@]}" "$DEVEL_SRCDIR/" "$DEST" || { eend; return 1; }
|
rsync "${rsync_opts[@]}" "$DEVEL_SRCDIR/" "$DEST" || { eend; return 1; }
|
||||||
|
|
||||||
@ -804,41 +789,21 @@ function build_update_apps() {
|
|||||||
|
|
||||||
elif [ -n "$SRC" ]; then
|
elif [ -n "$SRC" ]; then
|
||||||
if [ -d "$SRC" ]; then
|
if [ -d "$SRC" ]; then
|
||||||
[ -n "$have_RSYNC_OPTS" ] || RSYNC_OPTS=(--delete --delete-excluded)
|
local -a rsync_opts; rsync_opts=(-a --delete --exclude .git/ --delete-excluded)
|
||||||
local -a rsync_opts; rsync_opts=(-a --exclude .git/ "${RSYNC_OPTS[@]}")
|
|
||||||
|
|
||||||
SRC="${SRC%/}/"
|
SRC="${SRC%/}/"
|
||||||
DEST="${DEST%/}"
|
DEST="${DEST%/}/"
|
||||||
if [ ! -d "$DEST" ]; then
|
|
||||||
# s'assurer que le répertoire parent existe
|
|
||||||
mkdir -p "$(dirname -- "$DEST")" || { eend; return 1; }
|
|
||||||
fi
|
|
||||||
DEST="$DEST/"
|
|
||||||
|
|
||||||
estep "Synchro $SRC --> $DEST"
|
estep "Synchro $SRC --> $DEST"
|
||||||
rsync "${rsync_opts[@]}" "$SRC" "$DEST" || { eend; return 1; }
|
rsync "${rsync_opts[@]}" "$SRC" "$DEST" || { eend; return 1; }
|
||||||
|
|
||||||
elif [ -f "$SRC" ]; then
|
elif [ -f "$SRC" ]; then
|
||||||
[ -n "$have_RSYNC_OPTS" ] || RSYNC_OPTS=()
|
local -a rsync_opts; rsync_opts=(-a)
|
||||||
local -a rsync_opts; rsync_opts=(-a "${RSYNC_OPTS[@]}")
|
if [ "${DEST%/}" != "$DEST" -o -d "$DEST" ]; then
|
||||||
|
DEST="${DEST%/}/"
|
||||||
if [ "${DEST%/}" != "$DEST" -a ! -d "$DEST" ]; then
|
|
||||||
# on demande à ce que DEST soit un répertoire mais il
|
|
||||||
# n'existe pas: le créer
|
|
||||||
DEST="${DEST%/}"
|
|
||||||
mkdir -p "$DEST" || { eend; return 1; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "$DEST" ]; then
|
|
||||||
DEST="$DEST/"
|
|
||||||
elif [ ! -f "$DEST" ]; then
|
|
||||||
# la destination n'existe pas: s'assurer que le répertoire
|
|
||||||
# parent existe
|
|
||||||
mkdir -p "$(dirname -- "$DEST")" || { eend; return 1; }
|
|
||||||
fi
|
|
||||||
estep "Synchro $SRC --> $DEST"
|
estep "Synchro $SRC --> $DEST"
|
||||||
rsync "${rsync_opts[@]}" "$SRC" "$DEST" || { eend; return 1; }
|
rsync "${rsync_opts[@]}" "$SRC" "$DEST" || { eend; return 1; }
|
||||||
|
else
|
||||||
|
estep "Synchro $SRC --> $DEST"
|
||||||
|
rsync "${rsync_opts[@]}" "$SRC" "$DEST" || { eend; return 1; }
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
eerror "$app: $SRC: répertoire/fichier introuvable"
|
eerror "$app: $SRC: répertoire/fichier introuvable"
|
||||||
eend; return 1
|
eend; return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user