From 05540f5d860f5bf12e32a3799bc11747dea95c47 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 7 Apr 2026 19:06:14 -0500 Subject: [PATCH] =?UTF-8?q?Remove=20scripts/=20directory=20=E2=80=94=20rep?= =?UTF-8?q?laced=20by=20MokoStandards=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build, release, and utility functions are handled by the MokoStandards enterprise API. Local scripts are no longer needed. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/README.md | 74 ------------------------ scripts/download-google-fonts.sh | 96 -------------------------------- 2 files changed, 170 deletions(-) delete mode 100644 scripts/README.md delete mode 100755 scripts/download-google-fonts.sh diff --git a/scripts/README.md b/scripts/README.md deleted file mode 100644 index 995b9dd..0000000 --- a/scripts/README.md +++ /dev/null @@ -1,74 +0,0 @@ - - -# Scripts — MokoCassiopeia - -Utility scripts for managing the MokoCassiopeia Joomla template. - -## Available Scripts - -### download-google-fonts.sh - -**Purpose**: Download Google Fonts for local hosting. - -**Usage**: -```bash -./scripts/download-google-fonts.sh -``` - -Downloads font files and generates CSS `@font-face` declarations for local serving, avoiding external CDN dependencies. - ---- - -## Build & Release - -Builds and releases are handled entirely by GitHub Actions workflows. There are no local build scripts. - -### auto-release.yml - -**Triggers**: Push to `version/*` branches, manual dispatch. - -**Process**: -1. Reads version from `templateDetails.xml` -2. Builds ZIP from `src/` contents -3. Computes SHA-256 checksum -4. Creates/updates GitHub Release with ZIP asset -5. Updates `update.xml` with download URL and checksum - -### update-server.yml - -**Triggers**: Release published, manual dispatch. - -**Process**: -1. Updates `updates.xml` with version, download URL, and SHA-256 -2. Commits changes to main - ---- - -## Release Process - -All releases are automated via CI. To release: - -1. Bump version in `src/templateDetails.xml` -2. Merge to main -3. The workflow detects the version, builds the ZIP, and creates the release - -**Only create releases when `src/` has changes.** Non-src changes (docs, workflows, scripts) are cleanup and do not require a release. - ---- - -## License - -All scripts are licensed under GPL-3.0-or-later. - -Copyright (C) 2026 Moko Consulting diff --git a/scripts/download-google-fonts.sh b/scripts/download-google-fonts.sh deleted file mode 100755 index dc861b1..0000000 --- a/scripts/download-google-fonts.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# -# Download Google Fonts for self-hosting -# This script downloads Roboto, Noto Sans, and Fira Sans fonts - -set -e - -# Colors for output -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -NC='\033[0m' # No Color - -# Target directory -FONTS_DIR="../src/media/fonts" - -echo -e "${BLUE}╔════════════════════════════════════════════════╗${NC}" -echo -e "${BLUE}║ Google Fonts Downloader for MokoCassiopeia ║${NC}" -echo -e "${BLUE}╚════════════════════════════════════════════════╝${NC}" -echo "" - -# Check if fonts directory exists -if [ ! -d "$FONTS_DIR" ]; then - echo -e "${RED}✗ Error: Fonts directory not found: $FONTS_DIR${NC}" - exit 1 -fi - -cd "$FONTS_DIR" - -echo -e "${YELLOW}Target directory: $(pwd)${NC}" -echo "" - -# Function to download font CSS and extract font files -download_font() { - local font_name="$1" - local font_url="$2" - local display_name="$3" - - echo -e "${GREEN}Downloading $display_name...${NC}" - - # Download CSS with user agent for woff2 format - css=$(curl -s -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "$font_url") - - if [ -z "$css" ]; then - echo -e "${RED} ✗ Failed to download CSS${NC}" - return 1 - fi - - # Extract woff2 URLs - urls=$(echo "$css" | grep -oP 'https://fonts\.gstatic\.com[^\)]*\.woff2' || true) - - if [ -z "$urls" ]; then - echo -e "${RED} ✗ No font URLs found in CSS${NC}" - return 1 - fi - - count=0 - while IFS= read -r url; do - if [ -z "$url" ]; then - continue - fi - - filename=$(basename "$url") - echo -e " → Downloading ${filename}..." - - if curl -s "$url" -o "$filename"; then - size=$(du -h "$filename" | cut -f1) - echo -e "${GREEN} ✓ Downloaded ($size)${NC}" - ((count++)) - else - echo -e "${RED} ✗ Failed${NC}" - fi - done <<< "$urls" - - echo -e "${GREEN} ✓ Downloaded $count font files${NC}" - echo "" -} - -# Download fonts -download_font "roboto" "https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;700&display=swap" "Roboto" -download_font "noto-sans" "https://fonts.googleapis.com/css2?family=Noto+Sans:wght@100;300;400;700&display=swap" "Noto Sans" -download_font "fira-sans" "https://fonts.googleapis.com/css2?family=Fira+Sans:wght@100;300;400;700&display=swap" "Fira Sans" - -echo -e "${GREEN}╔════════════════════════════════════════════╗${NC}" -echo -e "${GREEN}║ ✓ All fonts downloaded successfully! ║${NC}" -echo -e "${GREEN}╚════════════════════════════════════════════╝${NC}" -echo "" -echo -e "Font files saved to: ${BLUE}$(pwd)${NC}" -echo "" -echo "Next steps:" -echo "1. Verify font files are present" -echo "2. Update templateDetails.xml font options (if needed)" -echo "3. Remove Google Fonts CDN preconnect links from PHP templates"