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
+3 -1
View File
@@ -3,14 +3,16 @@ set -euo pipefail
ROOT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
ENVIRONMENT="${1:-staging}"
[[ "$ENVIRONMENT" == dev || "$ENVIRONMENT" == staging ]] || { echo "usage: build-next-app [dev|staging]" >&2; exit 2; }
[[ "$ENVIRONMENT" == dev || "$ENVIRONMENT" == staging || "$ENVIRONMENT" == production || "$ENVIRONMENT" == prod ]] || { echo "usage: build-next-app [dev|staging|production|prod]" >&2; exit 2; }
ENV_FILE="${CI_ENV_FILE:-}"
cleanup() { [[ -n "$ENV_FILE" && "$ENV_FILE" != "${CI_ENV_FILE:-}" ]] && rm -f "$ENV_FILE" || true; }
trap cleanup EXIT
if [[ -z "$ENV_FILE" && -z "${CI:-}" ]]; then ENV_FILE="$(mktemp)"; sh "$ROOT_DIR/scripts/export-env" "$ENVIRONMENT" > "$ENV_FILE"; fi
if [[ -n "$ENV_FILE" ]]; then
bun dotenv -e "$ENV_FILE" -- bash "$ROOT_DIR/scripts/sync-convex-env" "$ENVIRONMENT" --from-current-env
bun dotenv -e "$ENV_FILE" -- bash "$ROOT_DIR/scripts/convex-codegen"
else
bash "$ROOT_DIR/scripts/sync-convex-env" "$ENVIRONMENT"
bash "$ROOT_DIR/scripts/convex-codegen"
fi
args=(); [[ -z "$ENV_FILE" ]] || args+=(--env-file "$ENV_FILE")