flow updates

This commit is contained in:
2025-05-29 17:50:34 -04:00
parent 27138013ba
commit 49a93eded8
3 changed files with 3 additions and 19 deletions

1
.env Normal file
View File

@ -0,0 +1 @@
GITEA_TOKEN=

19
flow
View File

@ -10,21 +10,6 @@ BUILD_DIRECTORY="web"
GITEA_ORGANIZATION="agreego"
GITEA_REPOSITORY="site"
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 # Handled error
fi
export GITEA_TOKEN
fi
success "Environment variables set"
}
build() {
# Create build directory if it doesn't exist
mkdir -p "$PACKAGE_DIRECTORY"
@ -38,17 +23,15 @@ build() {
}
site-usage() {
printf "env\tLoad environment variables from .env file.\n"
printf "build\tBuild the site.\n"
}
site-flow() {
case "$1" in
env) env; return $?;;
build) build; return $?;;
*) return 1 ;;
esac
}
register-flow "site-flow" "site-usage"
register-flow "site-usage" "site-flow"
dispatch "$@"

2
flows

Submodule flows updated: c33e7e1e05...e154758056