diff --git a/packages/release/bin/deployBackend.sh b/packages/release/bin/deployBackend.sh index f5d89b62b..13d8a8ca7 100755 --- a/packages/release/bin/deployBackend.sh +++ b/packages/release/bin/deployBackend.sh @@ -1,6 +1,11 @@ #!/bin/bash -source .env +# Determine the directory of the script +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Source the .env file from the parent directory of the script's directory +source "$SCRIPT_DIR/../.env" + echo "Deploying backend to $BE_HOST with script $BE_SCRIPT_PATH" # Connect to SSH and execute remote script diff --git a/packages/release/bin/purgeCfCache.sh b/packages/release/bin/purgeCfCache.sh index 11cfaacf2..eadb48c5d 100755 --- a/packages/release/bin/purgeCfCache.sh +++ b/packages/release/bin/purgeCfCache.sh @@ -1,5 +1,11 @@ #!/bin/bash -source .env + +# Determine the directory of the script +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Source the .env file from the parent directory of the script's directory +source "$SCRIPT_DIR/../.env" + echo "Purging Cloudflare cache for zone $CF_ZONE_ID" response=$(curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$CF_ZONE_ID/purge_cache" \ -H "Authorization: Bearer $CF_API_KEY" \