flow update
This commit is contained in:
15
flow
15
flow
@ -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 "$@"
|
||||
2
flows
2
flows
Submodule flows updated: e154758056...9c769152a7
Reference in New Issue
Block a user