Skip to content

Commit

Permalink
chore: ignore env file argument
Browse files Browse the repository at this point in the history
  • Loading branch information
ilbertt committed Apr 11, 2024
1 parent 2c59439 commit 2933ed9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions scripts/build-canister.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

set -e

# load environment variables
source .env
LOAD_ENV_FILE=true

# parse arguments
while [[ $# -gt 0 ]]; do
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion scripts/integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 2933ed9

Please sign in to comment.