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
|
# process idhubs instances for the purpose
|
||||||
for idhub in ${idhubs}; do
|
for idhub in ${idhubs}; do
|
||||||
|
idhub_dir="${idhub}__${target}"
|
||||||
if [ "${persistence}" = "n" ]; then
|
if [ "${persistence}" = "n" ]; then
|
||||||
# no data persistence: cleanup previous possible data
|
# no data persistence: cleanup previous possible data
|
||||||
rm -rf "./${idhub}"
|
rm -rf "./${idhub_dir}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# detect existing deployment
|
# detect existing deployment
|
||||||
if [ -d "./${idhub}" ]; then
|
if [ -d "./${idhub_dir}" ]; then
|
||||||
git -C "${idhub}" pull
|
git -C "${idhub_dir}" pull
|
||||||
# looks new
|
# looks new
|
||||||
else
|
else
|
||||||
echo "Detected new deployment, recreating git repos ${idhub}"
|
echo "Detected new deployment, recreating git repos ${idhub_dir}"
|
||||||
cp -rp IdHub "${idhub}"
|
cp -rp IdHub "${idhub_dir}"
|
||||||
# ensure the copy does not contain a DB
|
# ensure the copy does not contain a DB
|
||||||
rm -f "${idhub}/db.sqlite3"
|
rm -f "${idhub_dir}/db.sqlite3"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Reference in New Issue