flow updates

This commit is contained in:
2025-05-29 17:51:16 -04:00
parent 6ef7e0c55e
commit 8ec6a5b58a
4 changed files with 6 additions and 22 deletions

22
flow
View File

@ -14,21 +14,6 @@ CARGO_DEPENDENCIES=(cargo-pgrx==0.14.0)
GITEA_ORGANIZATION="cellular"
GITEA_REPOSITORY="jspg"
env() {
# Check if GITEA_TOKEN is set
if [ -z "$GITEA_TOKEN" ]; then
# If not set, try to get it from kubectl
GITEA_TOKEN=$(kubectl get secret -n cellular gitea-git -o jsonpath='{.data.token}' | base64 --decode)
if [ -z "$GITEA_TOKEN" ]; then
error "GITEA_TOKEN is not set and couldn't be retrieved from kubectl" >&2
return 2
fi
export GITEA_TOKEN
fi
success "Environment variables set"
}
pgrx-prepare() {
info "Initializing pgrx..."
# Explicitly point to the postgresql@${POSTGRES_VERSION} pg_config, don't rely on 'which'
@ -131,17 +116,16 @@ jspg-usage() {
jspg-flow() {
case "$1" in
env) env; return $?;;
prepare) prepare && cargo-prepare && pgrx-prepare; return $?;;
build) build; return $?;;
install) install; return $?;;
reinstall) clean && install; return $?;;
test) test "${@:2}"; return $?;;
clean) clean; return $?;;
release) env; release; return $?;;
*) return 1 ;;
esac
}
register-flow "jspg-flow" "jspg-usage"
dispatch "$@"
register-flow "jspg-usage" "jspg-flow"
dispatch "$@"