Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ed4b625c48 | |||
| a2f156db69 | |||
| fecf5e589f | |||
| 510a52d492 | |||
| 468669f0de | |||
| 7f2d3855e0 |
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "flows"]
|
||||||
|
path = flows
|
||||||
|
url = git@gitea-ssh.thoughtpatterns.ai:cellular/flows.git
|
||||||
40
site → flow
40
site → flow
@ -1,26 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Colors for that visual bass drop 🎵
|
# Flows
|
||||||
RED='\033[31m'
|
source "flows/base"
|
||||||
GREEN='\033[32m'
|
source "flows/release"
|
||||||
YELLOW='\033[33m'
|
|
||||||
BLUE='\033[34m'
|
|
||||||
MAGENTA='\033[35m'
|
|
||||||
CYAN='\033[36m'
|
|
||||||
RESET='\033[0m'
|
|
||||||
|
|
||||||
# Configuration
|
# Vars
|
||||||
BUILD_DIRECTORY="build"
|
BUILD_DIRECTORY="web"
|
||||||
|
|
||||||
# Source the release script
|
|
||||||
GITEA_ORGANIZATION="agreego"
|
GITEA_ORGANIZATION="agreego"
|
||||||
GITEA_REPOSITORY="site"
|
GITEA_REPOSITORY="site"
|
||||||
RELEASE_SCRIPT="../../thoughtpatterns/workspace/release.sh"
|
|
||||||
if [ ! -f "$RELEASE_SCRIPT" ]; then
|
|
||||||
echo -e "❌ ${RED}Release script not found at $RELEASE_SCRIPT${RESET}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
source "$RELEASE_SCRIPT"
|
|
||||||
|
|
||||||
env() {
|
env() {
|
||||||
# Check if GITEA_TOKEN is set
|
# Check if GITEA_TOKEN is set
|
||||||
@ -37,29 +24,30 @@ env() {
|
|||||||
echo -e "💰 ${GREEN}Environment variables set${RESET}"
|
echo -e "💰 ${GREEN}Environment variables set${RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
# Create build directory if it doesn't exist
|
# Create build directory if it doesn't exist
|
||||||
mkdir -p "$PACKAGE_DIRECTORY"
|
mkdir -p "$PACKAGE_DIRECTORY"
|
||||||
# Get version
|
# Get version
|
||||||
local version=$(get-version)
|
local version=$(get-version)
|
||||||
|
|
||||||
echo -e "📦 ${CYAN}Building site version ${GREEN}v$version${RESET}..."
|
echo -e "📦 ${CYAN}Building site version ${GREEN}v$version${RESET}..."
|
||||||
|
|
||||||
# Create the tarball
|
# Create the tarball
|
||||||
tar -czf "$PACKAGE_DIRECTORY/$GITEA_REPOSITORY.tar.gz" -C "$BUILD_DIRECTORY" .
|
tar -czf "$PACKAGE_DIRECTORY/$GITEA_REPOSITORY.tar.gz" -C "$BUILD_DIRECTORY" .
|
||||||
|
|
||||||
echo -e "✨ ${GREEN}Build complete${RESET}"
|
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
|
case "$1" in
|
||||||
env) env;;
|
env) env;;
|
||||||
build) env; build;;
|
build) env; build;;
|
||||||
tag) env; tag;;
|
tag) env; tag;;
|
||||||
package) env; package;;
|
package) env; package;;
|
||||||
release) env; release;;
|
release) env; release;;
|
||||||
*)
|
*) base "$@";;
|
||||||
echo "Usage: $0 {env|build|tag|package|release}"
|
|
||||||
exit 1;;
|
|
||||||
esac
|
esac
|
||||||
1
flows
Submodule
1
flows
Submodule
Submodule flows added at 8431378080
Reference in New Issue
Block a user