ops-jrz1/templates/plugin-skeleton/Makefile
Dan 3d33a45cc9 Add learner dev environment, testing infrastructure, and skills
Learner account management:
- learner-add.sh: create accounts with SSH, plugin skeleton
- learner-remove.sh: remove accounts with optional archive
- plugin-skeleton template: starter maubot plugin

Testing:
- flake.nix: add checks output for pre-deploy validation
- smoke-test.sh: post-deploy service verification

Documentation:
- learner-onboarding.md: VS Code Remote-SSH setup guide
- learner-admin.md: account management procedures

Skills:
- code-review.md: multi-lens code review skill
- orch, worklog: symlinks to shared skills
2025-12-28 22:23:06 -05:00

47 lines
1.3 KiB
Makefile

# Maubot Plugin Makefile
# Run 'make help' for available commands
PLUGIN_ID := $(shell grep '^id:' maubot.yaml | cut -d: -f2 | tr -d ' ')
VERSION := $(shell grep '^version:' maubot.yaml | cut -d: -f2 | tr -d ' ')
MODULES := $(shell grep -E '^ - ' maubot.yaml | sed 's/ - //')
MBP_FILE := dist/$(PLUGIN_ID)-$(VERSION).mbp
# Maubot API (accessible via SSH tunnel or localhost)
MAUBOT_URL := http://127.0.0.1:29316
.PHONY: build reload clean dev help check
help:
@echo "Maubot Plugin Development"
@echo ""
@echo "Commands:"
@echo " make build - Build the .mbp plugin file"
@echo " make check - Check Python syntax"
@echo " make clean - Remove built files"
@echo ""
@echo "Plugin: $(PLUGIN_ID) v$(VERSION)"
@echo "Output: $(MBP_FILE)"
build:
@echo "Building $(PLUGIN_ID) v$(VERSION)..."
@mkdir -p dist
@rm -f $(MBP_FILE)
@zip -r $(MBP_FILE) maubot.yaml $(MODULES)
@echo "Built: $(MBP_FILE)"
@ls -lh $(MBP_FILE)
check:
@echo "Checking Python syntax..."
@python3 -m py_compile $(MODULES)/*.py
@echo "Syntax OK"
clean:
rm -rf dist/*.mbp __pycache__ $(MODULES)/__pycache__
dev: check build
@echo ""
@echo "Plugin built! To deploy:"
@echo "1. Open maubot admin: http://localhost:29316"
@echo "2. Upload $(MBP_FILE)"
@echo "3. Create/update instance"