From a83eda57981bd2aa9f1ce6708d6e70e330189908 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Thu, 4 Jun 2026 13:25:50 -0500 Subject: [PATCH] chore: remove build/ directory from tracking Build artifacts are created by CI, not tracked in source. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- build/index.md | 19 -------- build/moko-make | 112 ------------------------------------------------ 2 files changed, 131 deletions(-) delete mode 100644 build/index.md delete mode 100644 build/moko-make diff --git a/build/index.md b/build/index.md deleted file mode 100644 index 46be81f..0000000 --- a/build/index.md +++ /dev/null @@ -1,19 +0,0 @@ -# Build Index: /api/build - -## Purpose - -This folder contains build system management and compilation scripts. - -## Quick Links - -- [README](./README.md) - Build scripts documentation - -## Scripts - -- [moko-make](./moko-make) - Build system wrapper -- [resolve_makefile.py](./resolve_makefile.py) - Makefile resolution - -## Metadata - -- **Document Type:** index -- **Auto-generated:** This file is manually maintained for ignored directory diff --git a/build/moko-make b/build/moko-make deleted file mode 100644 index ff51dc8..0000000 --- a/build/moko-make +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# -# Moko Build Wrapper -# Automatically finds and uses appropriate Makefile from MokoStandards - -set -e - -# Colors -COLOR_RESET="\033[0m" -COLOR_GREEN="\033[32m" -COLOR_BLUE="\033[34m" -COLOR_RED="\033[31m" - -# Find MokoStandards root -find_mokostandards() { - # Check environment variable - if [ -n "$MOKOSTANDARDS_ROOT" ] && [ -d "$MOKOSTANDARDS_ROOT/templates/build" ]; then - echo "$MOKOSTANDARDS_ROOT" - return 0 - fi - - # Check adjacent directories - if [ -d "../MokoStandards/templates/build" ]; then - echo "$(cd ../MokoStandards && pwd)" - return 0 - fi - - if [ -d "../../MokoStandards/templates/build" ]; then - echo "$(cd ../../MokoStandards && pwd)" - return 0 - fi - - # Check home directory - if [ -d "$HOME/.mokostandards/templates/build" ]; then - echo "$HOME/.mokostandards" - return 0 - fi - - # Check system location - if [ -d "/opt/mokostandards/templates/build" ]; then - echo "/opt/mokostandards" - return 0 - fi - - return 1 -} - -# Find appropriate Makefile -find_makefile() { - # Check for local Makefile - if [ -f "Makefile" ]; then - echo "Makefile" - return 0 - fi - - # Check for .moko/Makefile - if [ -f ".moko/Makefile" ]; then - echo ".moko/Makefile" - return 0 - fi - - # Find MokoStandards - MOKO_ROOT=$(find_mokostandards) - if [ $? -ne 0 ]; then - echo -e "${COLOR_RED}✗${COLOR_RESET} MokoStandards repository not found" >&2 - echo -e "${COLOR_BLUE}Hint:${COLOR_RESET} Set MOKOSTANDARDS_ROOT or clone adjacent" >&2 - return 1 - fi - - # Detect project type - if [ -d "core/modules" ] && ls core/modules/mod*.class.php >/dev/null 2>&1; then - echo "$MOKO_ROOT/templates/build/dolibarr/Makefile" - return 0 - fi - - # Check for Joomla XML files - shopt -s nullglob # Prevent glob expansion if no matches - for xml in *.xml; do - if [ -f "$xml" ]; then - if grep -q 'type="component"' "$xml" 2>/dev/null; then - echo "$MOKO_ROOT/templates/build/joomla/Makefile.component" - return 0 - elif grep -q 'type="module"' "$xml" 2>/dev/null; then - echo "$MOKO_ROOT/templates/build/joomla/Makefile.module" - return 0 - elif grep -q 'type="plugin"' "$xml" 2>/dev/null; then - echo "$MOKO_ROOT/templates/build/joomla/Makefile.plugin" - return 0 - fi - fi - done - shopt -u nullglob - - echo -e "${COLOR_RED}✗${COLOR_RESET} Could not detect project type" >&2 - return 1 -} - -# Main execution -MAKEFILE=$(find_makefile) -if [ $? -ne 0 ]; then - exit 1 -fi - -# Show which Makefile we're using -if [[ "$MAKEFILE" == *"MokoStandards"* ]] || [[ "$MAKEFILE" == *".mokostandards"* ]]; then - echo -e "${COLOR_BLUE}ℹ${COLOR_RESET} Using MokoStandards template" -fi - -# Run make with the found Makefile -exec make -f "$MAKEFILE" "$@"