12 Commits
1.0.5 ... main

Author SHA1 Message Date
319e77355f fixed tar command 2025-11-18 19:59:00 -05:00
49a93eded8 flow updates 2025-05-29 17:50:34 -04:00
27138013ba flow update 2025-04-25 13:33:36 -04:00
7c6145f62b flow update 2025-04-24 20:02:02 -04:00
eaf14281a2 flow 2025-04-16 21:13:38 -04:00
405e083e0d flow update 2025-04-16 20:00:32 -04:00
2d21fa1100 flow update 2025-04-16 19:34:02 -04:00
077d842a3c flow updates 2025-04-16 17:57:49 -04:00
0ee019c890 flow update 2025-04-15 01:52:41 -04:00
8ebd780258 flows update 2025-04-15 01:50:55 -04:00
6fd3e65cc1 version: 1.0.6 2025-04-13 23:01:30 -04:00
ba36d4d72b upgraded flow 2025-04-13 22:02:15 -04:00
4 changed files with 22 additions and 37 deletions

1
.env Normal file
View File

@ -0,0 +1 @@
GITEA_TOKEN=

54
flow
View File

@ -1,53 +1,37 @@
#!/bin/bash
# Flows
source "flows/base"
source "flows/release"
source ./flows/base
source ./flows/git
source ./flows/packaging
# Vars
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
echo -e "❌ ${RED}GITEA_TOKEN is not set and couldn't be retrieved from kubectl${RESET}" >&2
exit 1
fi
export GITEA_TOKEN
fi
echo -e "💰 ${GREEN}Environment variables set${RESET}"
}
build() {
# Create build directory if it doesn't exist
mkdir -p "$PACKAGE_DIRECTORY"
# Get version
local version=$(get-version)
echo -e "📦 ${CYAN}Building site version ${GREEN}v$version${RESET}..."
local version
version=$(get-version) || return $?
info "Building site version v$version..."
# Create the tarball
tar -czf "$PACKAGE_DIRECTORY/$GITEA_REPOSITORY.tar.gz" -C "$BUILD_DIRECTORY" .
echo -e "✨ ${GREEN}Build complete${RESET}"
COPYFILE_DISABLE=1 tar -czf "$PACKAGE_DIRECTORY/$GITEA_REPOSITORY.tar.gz" -C "$BUILD_DIRECTORY" . || return 2
success "Build complete"
}
usage() {
echo -e " env Load environment variables from .env file."
echo -e " build Build the site (requires env)."
echo -e " tag Tag the build (requires build)."
echo -e " package Package the build (requires build)."
echo -e " release Release the build (requires package)."
site-usage() {
printf "build\tBuild the site.\n"
}
case "$1" in
env) env;;
build) env; build;;
tag) env; tag;;
package) env; package;;
release) env; release;;
*) base "$@";;
esac
site-flow() {
case "$1" in
build) build; return $?;;
*) return 1 ;;
esac
}
register-flow "site-usage" "site-flow"
dispatch "$@"

2
flows

Submodule flows updated: 8431378080...e154758056

View File

@ -1 +1 @@
1.0.5
1.0.6