upgraded flows
This commit is contained in:
33
flow
33
flow
@ -1,21 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Colors for that visual bass drop 🎵
|
||||
RED='\033[31m'
|
||||
GREEN='\033[32m'
|
||||
YELLOW='\033[33m'
|
||||
BLUE='\033[34m'
|
||||
MAGENTA='\033[35m'
|
||||
CYAN='\033[36m'
|
||||
RESET='\033[0m'
|
||||
# Flows
|
||||
source "flows/base"
|
||||
source "flows/release"
|
||||
|
||||
# Configuration
|
||||
# Vars
|
||||
BUILD_DIRECTORY="web"
|
||||
|
||||
GITEA_ORGANIZATION="agreego"
|
||||
GITEA_REPOSITORY="site"
|
||||
# Source the release script
|
||||
source "flows/release"
|
||||
|
||||
env() {
|
||||
# Check if GITEA_TOKEN is set
|
||||
@ -32,29 +24,30 @@ env() {
|
||||
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}..."
|
||||
|
||||
# Create the tarball
|
||||
tar -czf "$PACKAGE_DIRECTORY/$GITEA_REPOSITORY.tar.gz" -C "$BUILD_DIRECTORY" .
|
||||
|
||||
echo -e "✨ ${GREEN}Build complete${RESET}"
|
||||
}
|
||||
|
||||
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)."
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
env) env;;
|
||||
build) env; build;;
|
||||
tag) env; tag;;
|
||||
package) env; package;;
|
||||
release) env; release;;
|
||||
*)
|
||||
echo "Usage: $0 {env|build|tag|package|release}"
|
||||
exit 1;;
|
||||
*) base "$@";;
|
||||
esac
|
||||
2
flows
2
flows
Submodule flows updated: 5abd1b1390...8431378080
Reference in New Issue
Block a user