synchro des dépendances uniquement pour le type composer
This commit is contained in:
parent
f508dae60f
commit
ae70f66089
44
dk
44
dk
|
@ -455,20 +455,35 @@ function build_update_apps() {
|
||||||
[ -n "$branch" ] || { branch="${var}_BRANCH"; branch="${!branch}"; }
|
[ -n "$branch" ] || { branch="${var}_BRANCH"; branch="${!branch}"; }
|
||||||
[ -n "$branch" ] || branch="$DEFAULT_BRANCH"
|
[ -n "$branch" ] || branch="$DEFAULT_BRANCH"
|
||||||
|
|
||||||
|
# calculer le type maintenant, on en a besoin pour le mode devel
|
||||||
|
type="${var}_TYPE"; type="${!type}"
|
||||||
|
|
||||||
dest="$dest/$app"
|
dest="$dest/$app"
|
||||||
if [ -n "$BUILD_UPDATE_DEVEL" ]; then
|
if [ -n "$BUILD_UPDATE_DEVEL" ]; then
|
||||||
# synchronisation en mode devel
|
# synchronisation en mode devel
|
||||||
local -a rsync_opts; rsync_opts=(-a --delete --exclude .git/ --delete-excluded)
|
local -a rsync_opts; rsync_opts=(-a --delete --exclude .git/ --delete-excluded)
|
||||||
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; }
|
||||||
local -a depdirs; local depdir pname
|
|
||||||
setx -a depdirs=ls -d "$dest/vendor/"{lib,ur}/* 2>/dev/null
|
if [ -z "$type" ]; then
|
||||||
for depdir in "${depdirs[@]}"; do
|
# possible de détecter le type quand on a le projet
|
||||||
[ -L "$depdir" ] && rm "$depdir"
|
# en cas de maj ici, mettre à jour aussi le code ci-dessous
|
||||||
pname="${depdir#$dest/vendor/}"; pname="${pname/\//-}"
|
if [ -f "$dest/composer.json" ]; then type=composer
|
||||||
estep "Synchro $DEFAULT_DEVEL_SRCDIR/$pname --> $depdir"
|
else type=inconnu
|
||||||
rsync "${rsync_opts[@]}" --exclude /vendor/ "$DEFAULT_DEVEL_SRCDIR/$pname/" "$depdir"
|
fi
|
||||||
done
|
fi
|
||||||
|
|
||||||
|
if [ "$type" == composer ]; then
|
||||||
|
# Synchronisation des dépendances
|
||||||
|
local -a depdirs; local depdir pname
|
||||||
|
setx -a depdirs=ls -d "$dest/vendor/"{lib,ur}/* 2>/dev/null
|
||||||
|
for depdir in "${depdirs[@]}"; do
|
||||||
|
[ -L "$depdir" ] && rm "$depdir"
|
||||||
|
pname="${depdir#$dest/vendor/}"; pname="${pname/\//-}"
|
||||||
|
estep "Synchro $DEFAULT_DEVEL_SRCDIR/$pname --> $depdir"
|
||||||
|
rsync "${rsync_opts[@]}" --exclude /vendor/ "$DEFAULT_DEVEL_SRCDIR/$pname/" "$depdir"
|
||||||
|
done
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if [ -d "$dest" -a -d "$dest/.git" ]; then
|
if [ -d "$dest" -a -d "$dest/.git" ]; then
|
||||||
# mise à jour
|
# mise à jour
|
||||||
|
@ -485,14 +500,13 @@ function build_update_apps() {
|
||||||
estep "Clonage $url:$branch --> $dest"
|
estep "Clonage $url:$branch --> $dest"
|
||||||
git clone -o "$origin" -b "$branch" "$url" "$dest" || { eend; return 1; }
|
git clone -o "$origin" -b "$branch" "$url" "$dest" || { eend; return 1; }
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
type="${var}_TYPE"; type="${!type}"
|
if [ -z "$type" ]; then
|
||||||
if [ -z "$type" ]; then
|
# possible de détecter le type quand on a le projet
|
||||||
if [ -f "$dest/composer.json" ]; then
|
# en cas de maj ici, mettre à jour aussi le code ci-dessus
|
||||||
type=composer
|
if [ -f "$dest/composer.json" ]; then type=composer
|
||||||
else
|
else type=inconnu
|
||||||
type=inconnu
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue