dk: bug dans la détection du type de projet

This commit is contained in:
Jephté Clain 2019-05-10 16:29:30 +04:00
parent 0891e89278
commit 72c3512072
1 changed files with 15 additions and 15 deletions

30
dk
View File

@ -314,6 +314,21 @@ function build_update_apps() {
[ -n "$branch" ] || { branch="${app}_BRANCH"; branch="${!branch}"; }
[ -n "$branch" ] || branch="$DEFAULT_BRANCH"
dest="$dest/$app"
if [ ! -d "$dest" ]; then
# clonage initial
estep "Clonage $url:$branch --> $dest"
git clone -o "$origin" -b "$branch" "$url" "$dest" || { eend; return 1; }
else
# mise à jour
estep "Maj dépôt $url:$branch --> $dest"
setx cwd=pwd
cd "$dest"
git fetch --all -p -f || { eend; return 1; }
git reset --hard "$origin/$branch" || { eend; return 1; }
cd "$cwd"
fi
type="${app}_TYPE"; type="${!type}"
if [ -z "$type" ]; then
if [ -f "$dest/composer.json" ]; then
@ -332,21 +347,6 @@ function build_update_apps() {
after_updates=()
fi
dest="$dest/$app"
if [ ! -d "$dest" ]; then
# clonage initial
estep "Clonage $url:$branch --> $dest"
git clone -o "$origin" -b "$branch" "$url" "$dest" || { eend; return 1; }
else
# mise à jour
estep "Maj dépôt $url:$branch --> $dest"
setx cwd=pwd
cd "$dest"
git fetch --all -p -f || { eend; return 1; }
git reset --hard "$origin/$branch" || { eend; return 1; }
cd "$cwd"
fi
estep "Type de dépôt: $type"
if [ "$type" == composer ]; then
composer=/usr/bin/composer