From 68f9a64e4c795839c9a52239aae2f382d3dcdcab Mon Sep 17 00:00:00 2001 From: pedro Date: Mon, 5 Feb 2024 20:48:20 +0100 Subject: [PATCH] env var idhub could be used instance autotest starts using it --- .gitignore | 2 +- build__common.sh | 1 + build__instance-autotest.sh | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 5166802..b2e81e9 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,6 @@ IdHub authentik ssikit_trustchain +idhub__* idhub1__* idhub2__* -idhub1__* diff --git a/build__common.sh b/build__common.sh index bab2a35..8017886 100644 --- a/build__common.sh +++ b/build__common.sh @@ -26,6 +26,7 @@ common_start() { ) # some targets might use idhub1 and/or idhub2 + idhub="${idhub:-idhub__${target}}" idhub1="${idhub1:-idhub1__${target}}" idhub2="${idhub2:-idhub2__${target}}" } diff --git a/build__instance-autotest.sh b/build__instance-autotest.sh index 6e31567..94aaa01 100755 --- a/build__instance-autotest.sh +++ b/build__instance-autotest.sh @@ -15,18 +15,18 @@ main() { target='instance-autotest' - idhub1="idhub__${target}" + idhub="idhub__${target}" common_start # no data persistence: cleanup previous possible data - rm -rf "./${idhub1}" "./${idhub2}" + rm -rf "./${idhub}" # detect if is new - if [ ! -f "./${idhub1}" ]; then + if [ ! -f "./${idhub}" ]; then echo 'Detected new deployment, recreating idhub git repo' - cp -rp IdHub "${idhub1}" - rm -f "${idhub1}/db.sqlite3" + cp -rp IdHub "${idhub}" + rm -f "${idhub}/db.sqlite3" fi common_end