diff --git a/scripts/build-canister.sh b/scripts/build-canister.sh index e2b2844..7cd9f00 100755 --- a/scripts/build-canister.sh +++ b/scripts/build-canister.sh @@ -2,8 +2,7 @@ set -e -# load environment variables -source .env +LOAD_ENV_FILE=true # parse arguments while [[ $# -gt 0 ]]; do @@ -18,9 +17,19 @@ while [[ $# -gt 0 ]]; do shift # past argument shift # past value ;; + --ignore-env-file) + LOAD_ENV_FILE=false + shift # past argument + ;; esac done +# load environment variables from .env +if [[ "$LOAD_ENV_FILE" = true ]]; then + echo -e "\nLoading environment variables from .env file...\n" + source .env +fi + # generate types dfx generate ic_backend diff --git a/scripts/integration-test.sh b/scripts/integration-test.sh index d95ad14..a90d890 100755 --- a/scripts/integration-test.sh +++ b/scripts/integration-test.sh @@ -7,7 +7,7 @@ ID_TOKEN_AUDIENCE="integration-test-audience" ./scripts/download-pocket-ic.sh -./scripts/build-canister.sh --issuer $ID_TOKEN_ISSUER_BASE_URL --audience $ID_TOKEN_AUDIENCE +./scripts/build-canister.sh --ignore-env-file --issuer $ID_TOKEN_ISSUER_BASE_URL --audience $ID_TOKEN_AUDIENCE BIN_DIR="$(pwd)/bin"