Files
Template-MCP/Makefile
T
jmiller ab9112c234
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 26s
ci(templates): gate build/CI/release/version workflows off template repos + normalize mokocli refs
- Add 'skip on Template-*' guards to build/CI/release/version workflows so they
  don't run on the template repo itself (only on repos created from it).
- Smart-gate sync workflows to run ONLY on Template-* sources (so platform
  templates still propagate, but regular repos don't trigger sync-out).
- Normalize mokocli->MokoCLI repo/clone URLs, drop stale mokoconsulting-tech
  org slug on the git host, and mokoplatform/moko-platform->mokocli.
  (/opt/mokocli + /tmp/mokocli server paths left intact.)
2026-07-05 20:37:37 +00:00

71 lines
1.7 KiB
Makefile

# MCP Server Makefile
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
# SPDX-License-Identifier: GPL-3.0-or-later
PROJECT_NAME := {{PROJECT_NAME}}
PROJECT_VERSION := 1.0.0
NPM := npm
COLOR_RESET := \033[0m
COLOR_GREEN := \033[32m
COLOR_BLUE := \033[34m
.PHONY: help
help: ## Show this help message
@echo "$(COLOR_BLUE)$(PROJECT_NAME) v$(PROJECT_VERSION)$(COLOR_RESET)"
@echo ""
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " $(COLOR_BLUE)%-20s$(COLOR_RESET) %s\n", $$1, $$2}'
@echo ""
.PHONY: install-deps
install-deps: ## Install dependencies
@$(NPM) install
@echo "$(COLOR_GREEN)✓ Dependencies installed$(COLOR_RESET)"
MOKO_PLATFORM ?= $(or $(wildcard ../mokocli),$(wildcard $(HOME)/mokocli),$(wildcard /opt/mokocli))
MINIFY_SCRIPT := $(MOKO_PLATFORM)/build/minify.js
.PHONY: minify
minify: ## Minify CSS/JS assets
@echo "Minifying assets..."
@if [ -f "$(MINIFY_SCRIPT)" ]; then \
node "$(MINIFY_SCRIPT)" $(SRC_DIR); \
elif [ -f "scripts/minify.js" ]; then \
node scripts/minify.js; \
else \
echo "No minify script found"; \
fi
.PHONY: build
build: minify ## Build TypeScript
@$(NPM) run build
@echo "$(COLOR_GREEN)✓ Build complete$(COLOR_RESET)"
.PHONY: dev
dev: ## Watch and rebuild on changes
@$(NPM) run dev
.PHONY: clean
clean: ## Clean build artifacts
@rm -rf dist
@echo "$(COLOR_GREEN)✓ Cleaned$(COLOR_RESET)"
.PHONY: setup
setup: ## Run interactive setup wizard
@$(NPM) run setup
.PHONY: start
start: ## Start the MCP server
@$(NPM) run start
.PHONY: lint
lint: ## Run linter
@$(NPM) run lint
.PHONY: ci
ci: install-deps build ## Run CI pipeline
@echo "$(COLOR_GREEN)✓ CI pipeline complete$(COLOR_RESET)"
.DEFAULT_GOAL := help