flow update

This commit is contained in:
2026-02-24 17:41:09 -05:00
parent 319e77355f
commit e0899c1bf8
3 changed files with 9 additions and 10 deletions

15
flow
View File

@ -3,6 +3,7 @@
# Flows
source ./flows/base
source ./flows/git
source ./flows/kube
source ./flows/packaging
# Vars
@ -14,24 +15,22 @@ build() {
# Create build directory if it doesn't exist
mkdir -p "$PACKAGE_DIRECTORY"
# Get version
local version
version=$(get-version) || return $?
version=$(get-version) || exit $?
info "Building site version v$version..."
# Create the tarball
COPYFILE_DISABLE=1 tar -czf "$PACKAGE_DIRECTORY/$GITEA_REPOSITORY.tar.gz" -C "$BUILD_DIRECTORY" . || return 2
success "Build complete"
COPYFILE_DISABLE=1 tar -czf "$PACKAGE_DIRECTORY/$GITEA_REPOSITORY.tar.gz" -C "$BUILD_DIRECTORY" . || abort "Failed to create tarball" 2
success "Build complete" && return 0
}
site-usage() {
printf "build\tBuild the site.\n"
echo "build|Build the site."
}
site-flow() {
case "$1" in
build) build; return $?;;
*) return 1 ;;
*) return 127 ;;
esac
}
register-flow "site-usage" "site-flow"
register-flow "site"
dispatch "$@"