Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ repos:

# Run the Ruff linter.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.8
rev: v0.15.6
hooks:
# Linter
- id: ruff
types_or: [python, pyi, jupyter, toml]
args: [--fix, --exit-non-zero-on-fix]
types_or: [python, pyi, jupyter, pyproject]
args: [--fix]
# Formatter
- id: ruff-format
types_or: [python, pyi, jupyter, toml]
types_or: [python, pyi, jupyter, pyproject]

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.403
Expand Down
27 changes: 24 additions & 3 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cd "$FIREBASE_FUNCTIONS_DIR"

cd "$BASE_DIR"

firebase use ${FIREBASE_PROJECT?error}
firebase use "${FIREBASE_PROJECT?error}"

firebase target:apply hosting auth "$FIREBASE_AUTH_SITE"

Expand All @@ -32,6 +32,27 @@ firebase functions:config:set \
osm.client_secret="$OSM_OAUTH_CLIENT_SECRET" \
osm.client_secret_web="$OSM_OAUTH_CLIENT_SECRET_WEB"

firebase deploy --only hosting
SKIP_HOSTING=false
FORCE=false

for arg in "$@"; do
case $arg in
--skip-hosting) SKIP_HOSTING=true ;;
--force) FORCE=true ;;
esac
done

# HOSTING
if [ "$SKIP_HOSTING" = false ]; then
firebase deploy --only hosting
fi

# DATABASE
firebase deploy --only database
firebase deploy --only functions

# FUNCTIONS
FUNCTIONS_CMD="firebase deploy --only functions"
if [ "$FORCE" = true ]; then
FUNCTIONS_CMD="$FUNCTIONS_CMD --force"
fi
eval $FUNCTIONS_CMD
Loading