diff --git a/.gitignore b/.gitignore index f33168d..b537acb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,2 @@ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ - -# OS directories -.DS_Store \ No newline at end of file +.DS_Store +/build/ \ No newline at end of file diff --git a/site b/site new file mode 100755 index 0000000..ddf2d3d --- /dev/null +++ b/site @@ -0,0 +1,130 @@ +#!/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' + +# Configuration +BUILD_DIRECTORY="build" +WEB_DIRECTORY="web" +GITEA_API_URL="https://gitea.thoughtpatterns.ai/api" +GITEA_ORGANIZATION="agreego" +GITEA_REPO="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}" +} + +get-version() { + grep -E '^[0-9]+\.[0-9]+\.[0-9]+' version +} + +site-version() { + local current_version=$(get-version) + local new_version="$1" + local increment_type="$2" + + if [ -z "$new_version" ] && [ -z "$increment_type" ]; then + # Just show current version + echo -e "📊 ${CYAN}Current version: ${GREEN}v$current_version${RESET}" + return 0 + fi + + if [ "$new_version" = "increment" ]; then + # Auto-increment based on type + local major minor patch + IFS='.' read -r major minor patch <<< "$current_version" + + case "${increment_type:-patch}" in + major) + major=$((major + 1)) + minor=0 + patch=0 + ;; + minor) + minor=$((minor + 1)) + patch=0 + ;; + patch|*) + patch=$((patch + 1)) + ;; + esac + + new_version="$major.$minor.$patch" + echo -e "📈 ${CYAN}Auto-incrementing ${increment_type:-patch} version: ${GREEN}v$current_version${RESET} → ${GREEN}v$new_version${RESET}" + else + echo -e "📝 ${CYAN}Setting manual version: ${GREEN}v$current_version${RESET} → ${GREEN}v$new_version${RESET}" + fi + + # Update version in version file + echo "$new_version" > version +} + +site-build() { + # Auto-increment patch version + site-version increment patch + # Get current version + local version=$(get-version) + # Create build directory + mkdir -p "$BUILD_DIRECTORY" + + echo -e "📦 ${CYAN}Building site version ${GREEN}v$version${RESET}..." + + # Create the tarball + tar -czf "$BUILD_DIRECTORY/site.tar.gz" -C "$WEB_DIRECTORY" . + + echo -e "✨ ${GREEN}Build complete${RESET}" +} + +site-package() { + # Ensure we have a build + if [ ! -f "$BUILD_DIRECTORY/site.tar.gz" ]; then + echo -e "❌ ${RED}No build found. Run 'site build' first${RESET}" >&2 + return 1 + fi + + # Get current version + local version=$(get-version) + echo -e "📊 ${CYAN}Packaging version: ${GREEN}v$version${RESET}" + + # Upload the site + echo -e "📦 ${CYAN}Uploading site.tar.gz...${RESET}" + if curl -X PUT \ + -H "Authorization: token $GITEA_TOKEN" \ + "$GITEA_API_URL/packages/$GITEA_ORGANIZATION/generic/$GITEA_REPO/$version/site.tar.gz" \ + -H "Content-Type: application/octet-stream" \ + -T "$BUILD_DIRECTORY/site.tar.gz" \ + -f > /dev/null; then + echo -e "✨ ${GREEN}Successfully uploaded site.tar.gz${RESET}" + else + echo -e "❌ ${RED}Failed to upload site.tar.gz${RESET}" >&2 + return 1 + fi + + echo -e "🚀 ${GREEN}Site published to v$version${RESET}" +} + +case "$1" in + env) env;; + build) env; site-build;; + package) env; site-package;; + *) + echo "Usage: $0 {env|build|package}" + exit 1;; +esac \ No newline at end of file diff --git a/version b/version new file mode 100644 index 0000000..7dea76e --- /dev/null +++ b/version @@ -0,0 +1 @@ +1.0.1 diff --git a/web/.gitignore b/web/.gitignore new file mode 100644 index 0000000..f33168d --- /dev/null +++ b/web/.gitignore @@ -0,0 +1,8 @@ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ + +# OS directories +.DS_Store \ No newline at end of file diff --git a/README.md b/web/README.md similarity index 100% rename from README.md rename to web/README.md diff --git a/css/webflow-style.css b/web/css/webflow-style.css similarity index 100% rename from css/webflow-style.css rename to web/css/webflow-style.css diff --git a/images/agreego-alpha-p-500.png b/web/images/agreego-alpha-p-500.png similarity index 100% rename from images/agreego-alpha-p-500.png rename to web/images/agreego-alpha-p-500.png diff --git a/images/agreego-alpha.png b/web/images/agreego-alpha.png similarity index 100% rename from images/agreego-alpha.png rename to web/images/agreego-alpha.png diff --git a/images/agreego-man-p-500.png b/web/images/agreego-man-p-500.png similarity index 100% rename from images/agreego-man-p-500.png rename to web/images/agreego-man-p-500.png diff --git a/images/agreego-man-p-800.png b/web/images/agreego-man-p-800.png similarity index 100% rename from images/agreego-man-p-800.png rename to web/images/agreego-man-p-800.png diff --git a/images/agreego-man.png b/web/images/agreego-man.png similarity index 100% rename from images/agreego-man.png rename to web/images/agreego-man.png diff --git a/images/app-icon.png b/web/images/app-icon.png similarity index 100% rename from images/app-icon.png rename to web/images/app-icon.png diff --git a/images/atlanta-p-1080.png b/web/images/atlanta-p-1080.png similarity index 100% rename from images/atlanta-p-1080.png rename to web/images/atlanta-p-1080.png diff --git a/images/atlanta-p-1600.png b/web/images/atlanta-p-1600.png similarity index 100% rename from images/atlanta-p-1600.png rename to web/images/atlanta-p-1600.png diff --git a/images/atlanta-p-500.png b/web/images/atlanta-p-500.png similarity index 100% rename from images/atlanta-p-500.png rename to web/images/atlanta-p-500.png diff --git a/images/atlanta-p-800.png b/web/images/atlanta-p-800.png similarity index 100% rename from images/atlanta-p-800.png rename to web/images/atlanta-p-800.png diff --git a/images/atlanta.png b/web/images/atlanta.png similarity index 100% rename from images/atlanta.png rename to web/images/atlanta.png diff --git a/images/carbon-chat.svg b/web/images/carbon-chat.svg similarity index 100% rename from images/carbon-chat.svg rename to web/images/carbon-chat.svg diff --git a/images/castleberry-point-card-p-1080.png b/web/images/castleberry-point-card-p-1080.png similarity index 100% rename from images/castleberry-point-card-p-1080.png rename to web/images/castleberry-point-card-p-1080.png diff --git a/images/castleberry-point-card-p-500.png b/web/images/castleberry-point-card-p-500.png similarity index 100% rename from images/castleberry-point-card-p-500.png rename to web/images/castleberry-point-card-p-500.png diff --git a/images/castleberry-point-card-p-800.png b/web/images/castleberry-point-card-p-800.png similarity index 100% rename from images/castleberry-point-card-p-800.png rename to web/images/castleberry-point-card-p-800.png diff --git a/images/castleberry-point-card.png b/web/images/castleberry-point-card.png similarity index 100% rename from images/castleberry-point-card.png rename to web/images/castleberry-point-card.png diff --git a/images/chaos.png b/web/images/chaos.png similarity index 100% rename from images/chaos.png rename to web/images/chaos.png diff --git a/images/dash-p-1080.png b/web/images/dash-p-1080.png similarity index 100% rename from images/dash-p-1080.png rename to web/images/dash-p-1080.png diff --git a/images/dash-p-1600.png b/web/images/dash-p-1600.png similarity index 100% rename from images/dash-p-1600.png rename to web/images/dash-p-1600.png diff --git a/images/dash-p-500.png b/web/images/dash-p-500.png similarity index 100% rename from images/dash-p-500.png rename to web/images/dash-p-500.png diff --git a/images/dash-p-800.png b/web/images/dash-p-800.png similarity index 100% rename from images/dash-p-800.png rename to web/images/dash-p-800.png diff --git a/images/dash.png b/web/images/dash.png similarity index 100% rename from images/dash.png rename to web/images/dash.png diff --git a/images/favicon.png b/web/images/favicon.png similarity index 100% rename from images/favicon.png rename to web/images/favicon.png diff --git a/images/mdi-virtual-meeting.svg b/web/images/mdi-virtual-meeting.svg similarity index 100% rename from images/mdi-virtual-meeting.svg rename to web/images/mdi-virtual-meeting.svg diff --git a/images/neighborhood-p-500.png b/web/images/neighborhood-p-500.png similarity index 100% rename from images/neighborhood-p-500.png rename to web/images/neighborhood-p-500.png diff --git a/images/neighborhood-p-800.png b/web/images/neighborhood-p-800.png similarity index 100% rename from images/neighborhood-p-800.png rename to web/images/neighborhood-p-800.png diff --git a/images/neighborhood.png b/web/images/neighborhood.png similarity index 100% rename from images/neighborhood.png rename to web/images/neighborhood.png diff --git a/images/streamline-arrow-roadmap.svg b/web/images/streamline-arrow-roadmap.svg similarity index 100% rename from images/streamline-arrow-roadmap.svg rename to web/images/streamline-arrow-roadmap.svg diff --git a/images/underline.svg b/web/images/underline.svg similarity index 100% rename from images/underline.svg rename to web/images/underline.svg diff --git a/images/webflow-badge-icon-d2.89e12c322e.svg b/web/images/webflow-badge-icon-d2.89e12c322e.svg similarity index 100% rename from images/webflow-badge-icon-d2.89e12c322e.svg rename to web/images/webflow-badge-icon-d2.89e12c322e.svg diff --git a/images/webflow-badge-text-d2.c82cec3b78.svg b/web/images/webflow-badge-text-d2.c82cec3b78.svg similarity index 100% rename from images/webflow-badge-text-d2.c82cec3b78.svg rename to web/images/webflow-badge-text-d2.c82cec3b78.svg diff --git a/index.html b/web/index.html similarity index 100% rename from index.html rename to web/index.html diff --git a/js/jquery.js b/web/js/jquery.js similarity index 100% rename from js/jquery.js rename to web/js/jquery.js diff --git a/js/webflow-script.js b/web/js/webflow-script.js similarity index 100% rename from js/webflow-script.js rename to web/js/webflow-script.js diff --git a/roadmap.html b/web/roadmap.html similarity index 100% rename from roadmap.html rename to web/roadmap.html