Update stuff
Build and Push Next App / quality (push) Successful in 1m34s
Build and Push Next App / build-next (push) Successful in 3m22s

This commit is contained in:
Gabriel Brown
2026-06-21 23:22:05 -05:00
parent 112fd55ea7
commit b16cd9e2f7
9 changed files with 161 additions and 34 deletions
+12 -5
View File
@@ -1,12 +1,19 @@
#!/usr/bin/env sh
set -eu
[ "$#" -eq 1 ] || { echo "usage: export-env <dev|staging>" >&2; exit 2; }
[ "$#" -eq 1 ] || { echo "usage: export-env <dev|staging|production|prod>" >&2; exit 2; }
ENVIRONMENT="$1"
case "$ENVIRONMENT" in dev|staging) ;; *) echo "export-env: expected dev or staging" >&2; exit 2 ;; esac
case "$ENVIRONMENT" in
dev|staging|production|prod) ;;
*) echo "export-env: expected dev, staging, production, or prod" >&2; exit 2 ;;
esac
INFISICAL_ENV="$ENVIRONMENT"
case "$INFISICAL_ENV" in
production) INFISICAL_ENV=prod ;;
esac
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
STATE_FILE="$ROOT_DIR/.local/$ENVIRONMENT.generated.env"
STATE_FILE="$ROOT_DIR/.local/$INFISICAL_ENV.generated.env"
if [ -n "${CI:-}" ]; then
echo "export-env: refusing to export secrets in CI; use injected variables or CI_ENV_FILE." >&2
@@ -16,8 +23,8 @@ fi
[ -f "$ROOT_DIR/.infisical.json" ] || { echo "export-env: run 'infisical init' in this repository." >&2; exit 1; }
command -v infisical >/dev/null 2>&1 || { echo "export-env: Infisical CLI is required." >&2; exit 1; }
(cd "$ROOT_DIR" && infisical export --env="$ENVIRONMENT" --format=dotenv --silent) || {
echo "export-env: failed to export '$ENVIRONMENT'; check login and project access." >&2
(cd "$ROOT_DIR" && infisical export --env="$INFISICAL_ENV" --format=dotenv --silent) || {
echo "export-env: failed to export '$INFISICAL_ENV'; check login and project access." >&2
exit 1
}