build__common.sh bugfix deployment dir
This commit is contained in:
parent
4a99e8a4f8
commit
4b3345673d
|
@ -28,20 +28,21 @@ common_start() {
|
|||
|
||||
# process idhubs instances for the purpose
|
||||
for idhub in ${idhubs}; do
|
||||
idhub_dir="${idhub}__${target}"
|
||||
if [ "${persistence}" = "n" ]; then
|
||||
# no data persistence: cleanup previous possible data
|
||||
rm -rf "./${idhub}"
|
||||
rm -rf "./${idhub_dir}"
|
||||
fi
|
||||
|
||||
# detect existing deployment
|
||||
if [ -d "./${idhub}" ]; then
|
||||
git -C "${idhub}" pull
|
||||
if [ -d "./${idhub_dir}" ]; then
|
||||
git -C "${idhub_dir}" pull
|
||||
# looks new
|
||||
else
|
||||
echo "Detected new deployment, recreating git repos ${idhub}"
|
||||
cp -rp IdHub "${idhub}"
|
||||
echo "Detected new deployment, recreating git repos ${idhub_dir}"
|
||||
cp -rp IdHub "${idhub_dir}"
|
||||
# ensure the copy does not contain a DB
|
||||
rm -f "${idhub}/db.sqlite3"
|
||||
rm -f "${idhub_dir}/db.sqlite3"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Reference in New Issue