From 49a93eded8cf7100e4b2710c84c718b57b08b156 Mon Sep 17 00:00:00 2001 From: Alex Groleau Date: Thu, 29 May 2025 17:50:34 -0400 Subject: [PATCH] flow updates --- .env | 1 + flow | 19 +------------------ flows | 2 +- 3 files changed, 3 insertions(+), 19 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..b0428ea --- /dev/null +++ b/.env @@ -0,0 +1 @@ +GITEA_TOKEN= diff --git a/flow b/flow index 80677cf..5f60d4a 100755 --- a/flow +++ b/flow @@ -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 "$@" \ No newline at end of file diff --git a/flows b/flows index c33e7e1..e154758 160000 --- a/flows +++ b/flows @@ -1 +1 @@ -Subproject commit c33e7e1e05741c5c7c20ab75db67be4eefb78653 +Subproject commit e1547580568c976bc4d310d499edb6ea38c89f34