Merge pull request #58 from mokoconsulting-tech/copilot/remove-all-workflows-scripts
Remove workflow, script, VS Code, Makefile references, files, and issue templates
This commit was merged in pull request #58.
This commit is contained in:
16
.github/ISSUE_TEMPLATE/adr.md
vendored
16
.github/ISSUE_TEMPLATE/adr.md
vendored
@@ -1,16 +0,0 @@
|
|||||||
# Architecture Decision Record Proposal
|
|
||||||
|
|
||||||
## Title
|
|
||||||
|
|
||||||
## Status
|
|
||||||
Proposed
|
|
||||||
|
|
||||||
## Context
|
|
||||||
|
|
||||||
## Decision
|
|
||||||
|
|
||||||
## Consequences
|
|
||||||
|
|
||||||
## Alternatives Considered
|
|
||||||
|
|
||||||
## Review and Approval
|
|
||||||
29
.github/ISSUE_TEMPLATE/bug_report.md
vendored
29
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,29 +0,0 @@
|
|||||||
# Bug Report
|
|
||||||
|
|
||||||
## Summary
|
|
||||||
Provide a concise description of the defect and impact.
|
|
||||||
|
|
||||||
## Environment
|
|
||||||
- Application version
|
|
||||||
- Browser or OS
|
|
||||||
- Device
|
|
||||||
- Configuration details
|
|
||||||
|
|
||||||
## Steps to Reproduce
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
3.
|
|
||||||
|
|
||||||
## Expected Behavior
|
|
||||||
|
|
||||||
## Actual Behavior
|
|
||||||
|
|
||||||
## Logs / Screenshots
|
|
||||||
|
|
||||||
## Severity & Impact
|
|
||||||
|
|
||||||
## Related Incidents or Tickets
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
## Review and Approval
|
|
||||||
20
.github/ISSUE_TEMPLATE/deployment_plan.md
vendored
20
.github/ISSUE_TEMPLATE/deployment_plan.md
vendored
@@ -1,20 +0,0 @@
|
|||||||
# Deployment Plan
|
|
||||||
|
|
||||||
## Purpose
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
## Preconditions
|
|
||||||
|
|
||||||
## Deployment Steps
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
3.
|
|
||||||
|
|
||||||
## Validation
|
|
||||||
|
|
||||||
## Rollback Plan
|
|
||||||
|
|
||||||
## Communications
|
|
||||||
|
|
||||||
## Review and Approval
|
|
||||||
11
.github/ISSUE_TEMPLATE/documentation_change.md
vendored
11
.github/ISSUE_TEMPLATE/documentation_change.md
vendored
@@ -1,11 +0,0 @@
|
|||||||
# Documentation Change
|
|
||||||
|
|
||||||
## Summary
|
|
||||||
|
|
||||||
## Context
|
|
||||||
|
|
||||||
## Proposed Updates
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
## Review and Approval
|
|
||||||
14
.github/ISSUE_TEMPLATE/escalation.md
vendored
14
.github/ISSUE_TEMPLATE/escalation.md
vendored
@@ -1,14 +0,0 @@
|
|||||||
# Escalation
|
|
||||||
|
|
||||||
## Trigger Conditions
|
|
||||||
|
|
||||||
## Severity Level
|
|
||||||
SEV1 | SEV2 | SEV3
|
|
||||||
|
|
||||||
## Escalation Path
|
|
||||||
|
|
||||||
## Communication Plan
|
|
||||||
|
|
||||||
## Closure Criteria
|
|
||||||
|
|
||||||
## Review and Approval
|
|
||||||
21
.github/ISSUE_TEMPLATE/feature_request.md
vendored
21
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,21 +0,0 @@
|
|||||||
# Feature Request
|
|
||||||
|
|
||||||
## Summary
|
|
||||||
|
|
||||||
## Background / Problem Statement
|
|
||||||
|
|
||||||
## Proposed Solution
|
|
||||||
|
|
||||||
## Alternatives Considered
|
|
||||||
|
|
||||||
## Technical Details
|
|
||||||
|
|
||||||
## User Impact
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
## Risks
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
|
|
||||||
## Review and Approval
|
|
||||||
19
.github/ISSUE_TEMPLATE/incident_report.md
vendored
19
.github/ISSUE_TEMPLATE/incident_report.md
vendored
@@ -1,19 +0,0 @@
|
|||||||
# Incident Report
|
|
||||||
|
|
||||||
## Incident Summary
|
|
||||||
|
|
||||||
## Timeline
|
|
||||||
|
|
||||||
## Impact Assessment
|
|
||||||
|
|
||||||
## Root Cause
|
|
||||||
|
|
||||||
## Corrective Actions
|
|
||||||
|
|
||||||
## Preventive Actions
|
|
||||||
|
|
||||||
## Follow Up
|
|
||||||
|
|
||||||
## Communications
|
|
||||||
|
|
||||||
## Review and Approval
|
|
||||||
20
.github/ISSUE_TEMPLATE/migration_plan.md
vendored
20
.github/ISSUE_TEMPLATE/migration_plan.md
vendored
@@ -1,20 +0,0 @@
|
|||||||
# Migration Plan
|
|
||||||
|
|
||||||
## Purpose
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
## Preconditions
|
|
||||||
|
|
||||||
## Migration Steps
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
3.
|
|
||||||
|
|
||||||
## Rollback Plan
|
|
||||||
|
|
||||||
## Validation
|
|
||||||
|
|
||||||
## Stakeholder Communications
|
|
||||||
|
|
||||||
## Review and Approval
|
|
||||||
13
.github/ISSUE_TEMPLATE/risk_register_entry.md
vendored
13
.github/ISSUE_TEMPLATE/risk_register_entry.md
vendored
@@ -1,13 +0,0 @@
|
|||||||
# Risk Register Entry
|
|
||||||
|
|
||||||
## Risk Description
|
|
||||||
|
|
||||||
## Probability and Impact
|
|
||||||
|
|
||||||
## Mitigation Plan
|
|
||||||
|
|
||||||
## Contingency Plan
|
|
||||||
|
|
||||||
## Owners and Review Cadence
|
|
||||||
|
|
||||||
## Review and Approval
|
|
||||||
18
.github/ISSUE_TEMPLATE/runbook.md
vendored
18
.github/ISSUE_TEMPLATE/runbook.md
vendored
@@ -1,18 +0,0 @@
|
|||||||
# Runbook
|
|
||||||
|
|
||||||
## Purpose
|
|
||||||
|
|
||||||
## Preconditions
|
|
||||||
|
|
||||||
## Procedure
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
3.
|
|
||||||
|
|
||||||
## Validation
|
|
||||||
|
|
||||||
## Rollback
|
|
||||||
|
|
||||||
## References
|
|
||||||
|
|
||||||
## Review and Approval
|
|
||||||
15
.github/ISSUE_TEMPLATE/security_review.md
vendored
15
.github/ISSUE_TEMPLATE/security_review.md
vendored
@@ -1,15 +0,0 @@
|
|||||||
# Security Review
|
|
||||||
|
|
||||||
## Purpose
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
## Threat Model Summary
|
|
||||||
|
|
||||||
## Findings
|
|
||||||
|
|
||||||
## Remediation Actions
|
|
||||||
|
|
||||||
## Approval
|
|
||||||
|
|
||||||
## Review and Approval
|
|
||||||
171
.vscode/tasks.json
vendored
171
.vscode/tasks.json
vendored
@@ -1,171 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"label": "Validate All",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "./scripts/run/validate_all.sh",
|
|
||||||
"group": {
|
|
||||||
"kind": "test",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "new"
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Validate Required",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "make validate-required",
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "new"
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Run Tests",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "codecept run",
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "new"
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "PHP CodeSniffer",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "phpcs --standard=phpcs.xml src/",
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "shared"
|
|
||||||
},
|
|
||||||
"problemMatcher": {
|
|
||||||
"owner": "php",
|
|
||||||
"fileLocation": "relative",
|
|
||||||
"pattern": {
|
|
||||||
"regexp": "^(.+):(\\d+):(\\d+):\\s+(error|warning)\\s+-\\s+(.+)$",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"column": 3,
|
|
||||||
"severity": 4,
|
|
||||||
"message": 5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "PHP CodeSniffer - Auto Fix",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "phpcbf --standard=phpcs.xml src/",
|
|
||||||
"group": "none",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "shared"
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "PHPStan",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "phpstan analyse --configuration=phpstan.neon",
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "shared"
|
|
||||||
},
|
|
||||||
"problemMatcher": {
|
|
||||||
"owner": "php",
|
|
||||||
"fileLocation": "relative",
|
|
||||||
"pattern": {
|
|
||||||
"regexp": "^(.+):(\\d+):\\s+(.+)$",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"message": 3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Create Package",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "./scripts/release/package_extension.sh dist",
|
|
||||||
"group": "build",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "new"
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Smoke Test",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "./scripts/run/smoke_test.sh",
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "new"
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Script Health Check",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "./scripts/run/script_health.sh",
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "new"
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Check Code Quality",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "make quality",
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "new"
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Fix Permissions",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "make fix-permissions",
|
|
||||||
"group": "none",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "shared"
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Clean",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "make clean",
|
|
||||||
"group": "none",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "shared"
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Install Git Hooks",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "./scripts/git/install-hooks.sh",
|
|
||||||
"group": "none",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "new"
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -38,7 +38,6 @@ These guidelines apply to all contributions, including:
|
|||||||
|
|
||||||
* Source code changes
|
* Source code changes
|
||||||
* Documentation updates
|
* Documentation updates
|
||||||
* Workflow and automation changes
|
|
||||||
* Bug reports and enhancement proposals
|
* Bug reports and enhancement proposals
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
@@ -58,9 +57,6 @@ For first-time contributors:
|
|||||||
# Clone the repository
|
# Clone the repository
|
||||||
git clone https://github.com/mokoconsulting-tech/moko-cassiopeia.git
|
git clone https://github.com/mokoconsulting-tech/moko-cassiopeia.git
|
||||||
cd moko-cassiopeia
|
cd moko-cassiopeia
|
||||||
|
|
||||||
# Run development setup
|
|
||||||
make dev-setup
|
|
||||||
```
|
```
|
||||||
|
|
||||||
See [docs/QUICK_START.md](./docs/QUICK_START.md) for detailed setup instructions.
|
See [docs/QUICK_START.md](./docs/QUICK_START.md) for detailed setup instructions.
|
||||||
@@ -69,20 +65,14 @@ See [docs/QUICK_START.md](./docs/QUICK_START.md) for detailed setup instructions
|
|||||||
|
|
||||||
The repository provides several tools to streamline development:
|
The repository provides several tools to streamline development:
|
||||||
|
|
||||||
* **Makefile**: Common development tasks (`make help` to see all commands)
|
|
||||||
* **Pre-commit Hooks**: Automatic local validation before commits
|
* **Pre-commit Hooks**: Automatic local validation before commits
|
||||||
* **VS Code Tasks**: Pre-configured tasks for common operations
|
|
||||||
* **CI/CD Workflows**: Automated testing and deployment via MokoStandards
|
|
||||||
|
|
||||||
Run `make validate-required` before submitting PRs to catch common issues early.
|
|
||||||
|
|
||||||
## Contribution Workflow
|
## Contribution Workflow
|
||||||
|
|
||||||
1. Fork the repository.
|
1. Fork the repository.
|
||||||
2. Create a branch from the active development branch.
|
2. Create a branch from the active development branch.
|
||||||
3. Make focused, minimal changes that address a single concern.
|
3. Make focused, minimal changes that address a single concern.
|
||||||
4. Ensure changes pass existing CI checks.
|
4. Submit a pull request with a clear description of intent and impact.
|
||||||
5. Submit a pull request with a clear description of intent and impact.
|
|
||||||
|
|
||||||
Direct commits to protected branches are not permitted.
|
Direct commits to protected branches are not permitted.
|
||||||
|
|
||||||
|
|||||||
265
Makefile
265
Makefile
@@ -1,265 +0,0 @@
|
|||||||
# Makefile for Moko Cassiopeia Development
|
|
||||||
# Copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
.PHONY: help install validate test quality package clean dev-setup
|
|
||||||
|
|
||||||
# Default target
|
|
||||||
.DEFAULT_GOAL := help
|
|
||||||
|
|
||||||
# Version detection
|
|
||||||
VERSION := $(shell grep -oP '<version>\K[^<]+' src/templates/templateDetails.xml 2>/dev/null || echo "unknown")
|
|
||||||
|
|
||||||
## help: Show this help message
|
|
||||||
help:
|
|
||||||
@echo "Moko Cassiopeia Development Makefile"
|
|
||||||
@echo ""
|
|
||||||
@echo "Version: $(VERSION)"
|
|
||||||
@echo ""
|
|
||||||
@echo "Available targets:"
|
|
||||||
@sed -n 's/^##//p' $(MAKEFILE_LIST) | column -t -s ':' | sed -e 's/^/ /'
|
|
||||||
|
|
||||||
## install: Install development dependencies
|
|
||||||
install:
|
|
||||||
@echo "Installing development dependencies..."
|
|
||||||
@command -v composer >/dev/null 2>&1 || { echo "Error: composer not found. Please install composer first."; exit 1; }
|
|
||||||
composer global require "squizlabs/php_codesniffer:^3.0" --with-all-dependencies
|
|
||||||
composer global require "phpstan/phpstan:^1.0" --with-all-dependencies
|
|
||||||
composer global require "phpcompatibility/php-compatibility:^9.0" --with-all-dependencies
|
|
||||||
composer global require "codeception/codeception" --with-all-dependencies
|
|
||||||
composer global require "vimeo/psalm:^5.0" --with-all-dependencies
|
|
||||||
composer global require "phpmd/phpmd:^2.0" --with-all-dependencies
|
|
||||||
composer global require "friendsofphp/php-cs-fixer:^3.0" --with-all-dependencies
|
|
||||||
phpcs --config-set installed_paths ~/.composer/vendor/phpcompatibility/php-compatibility
|
|
||||||
@echo "✓ Dependencies installed"
|
|
||||||
|
|
||||||
## validate: Run all validation scripts
|
|
||||||
validate:
|
|
||||||
@echo "Running validation scripts..."
|
|
||||||
@python3 ./scripts/run/validate_all.py
|
|
||||||
|
|
||||||
## validate-required: Run only required validation scripts
|
|
||||||
validate-required:
|
|
||||||
@echo "Running required validations..."
|
|
||||||
@python3 ./scripts/validate/manifest.py
|
|
||||||
@python3 ./scripts/validate/xml_wellformed.py
|
|
||||||
@python3 ./scripts/validate/workflows.py
|
|
||||||
@echo "✓ Required validations passed"
|
|
||||||
|
|
||||||
## test: Run all tests
|
|
||||||
test:
|
|
||||||
@echo "Running tests..."
|
|
||||||
@command -v codecept >/dev/null 2>&1 || { echo "Error: codecept not found. Run 'make install' first."; exit 1; }
|
|
||||||
codecept run
|
|
||||||
|
|
||||||
## test-unit: Run unit tests only
|
|
||||||
test-unit:
|
|
||||||
@echo "Running unit tests..."
|
|
||||||
@command -v codecept >/dev/null 2>&1 || { echo "Error: codecept not found. Run 'make install' first."; exit 1; }
|
|
||||||
codecept run unit
|
|
||||||
|
|
||||||
## test-acceptance: Run acceptance tests only
|
|
||||||
test-acceptance:
|
|
||||||
@echo "Running acceptance tests..."
|
|
||||||
@command -v codecept >/dev/null 2>&1 || { echo "Error: codecept not found. Run 'make install' first."; exit 1; }
|
|
||||||
codecept run acceptance
|
|
||||||
|
|
||||||
## quality: Run code quality checks
|
|
||||||
quality:
|
|
||||||
@echo "Running code quality checks..."
|
|
||||||
@$(MAKE) phpcs
|
|
||||||
@$(MAKE) phpstan
|
|
||||||
@$(MAKE) phpcompat
|
|
||||||
|
|
||||||
## phpcs: Run PHP_CodeSniffer
|
|
||||||
phpcs:
|
|
||||||
@echo "Running PHP_CodeSniffer..."
|
|
||||||
@command -v phpcs >/dev/null 2>&1 || { echo "Error: phpcs not found. Run 'make install' first."; exit 1; }
|
|
||||||
phpcs --standard=phpcs.xml src/
|
|
||||||
|
|
||||||
## phpcs-fix: Auto-fix PHPCS violations
|
|
||||||
phpcs-fix:
|
|
||||||
@echo "Auto-fixing PHPCS violations..."
|
|
||||||
@command -v phpcbf >/dev/null 2>&1 || { echo "Error: phpcbf not found. Run 'make install' first."; exit 1; }
|
|
||||||
phpcbf --standard=phpcs.xml src/
|
|
||||||
|
|
||||||
## phpstan: Run PHPStan static analysis
|
|
||||||
phpstan:
|
|
||||||
@echo "Running PHPStan..."
|
|
||||||
@command -v phpstan >/dev/null 2>&1 || { echo "Error: phpstan not found. Run 'make install' first."; exit 1; }
|
|
||||||
phpstan analyse --configuration=phpstan.neon
|
|
||||||
|
|
||||||
## phpcompat: Check PHP 8.0+ compatibility
|
|
||||||
phpcompat:
|
|
||||||
@echo "Checking PHP 8.0+ compatibility..."
|
|
||||||
@command -v phpcs >/dev/null 2>&1 || { echo "Error: phpcs not found. Run 'make install' first."; exit 1; }
|
|
||||||
phpcs --standard=PHPCompatibility --runtime-set testVersion 8.0- src/
|
|
||||||
|
|
||||||
## psalm: Run Psalm static analysis
|
|
||||||
psalm:
|
|
||||||
@echo "Running Psalm static analysis..."
|
|
||||||
@command -v psalm >/dev/null 2>&1 || { echo "Error: psalm not found. Run 'make install' first."; exit 1; }
|
|
||||||
psalm --show-info=false
|
|
||||||
|
|
||||||
## phpmd: Run PHP Mess Detector
|
|
||||||
phpmd:
|
|
||||||
@echo "Running PHP Mess Detector..."
|
|
||||||
@command -v phpmd >/dev/null 2>&1 || { echo "Error: phpmd not found. Run 'make install' first."; exit 1; }
|
|
||||||
phpmd src/ text cleancode,codesize,controversial,design,naming,unusedcode
|
|
||||||
|
|
||||||
## php-cs-fixer: Run PHP-CS-Fixer
|
|
||||||
php-cs-fixer:
|
|
||||||
@echo "Running PHP-CS-Fixer..."
|
|
||||||
@command -v php-cs-fixer >/dev/null 2>&1 || { echo "Error: php-cs-fixer not found. Run 'make install' first."; exit 1; }
|
|
||||||
php-cs-fixer fix --dry-run --diff src/
|
|
||||||
|
|
||||||
## php-cs-fixer-fix: Auto-fix with PHP-CS-Fixer
|
|
||||||
php-cs-fixer-fix:
|
|
||||||
@echo "Auto-fixing with PHP-CS-Fixer..."
|
|
||||||
@command -v php-cs-fixer >/dev/null 2>&1 || { echo "Error: php-cs-fixer not found. Run 'make install' first."; exit 1; }
|
|
||||||
php-cs-fixer fix src/
|
|
||||||
|
|
||||||
## quality-extended: Run extended quality checks (includes psalm, phpmd)
|
|
||||||
quality-extended:
|
|
||||||
@echo "Running extended code quality checks..."
|
|
||||||
@$(MAKE) quality
|
|
||||||
@$(MAKE) psalm
|
|
||||||
@$(MAKE) phpmd
|
|
||||||
@echo "✓ All quality checks passed"
|
|
||||||
|
|
||||||
## package: Create distribution package
|
|
||||||
package:
|
|
||||||
@echo "Creating distribution package..."
|
|
||||||
@python3 ./scripts/release/package_extension.py dist $(VERSION)
|
|
||||||
@echo "✓ Package created: dist/moko-cassiopeia-$(VERSION)-*.zip"
|
|
||||||
|
|
||||||
## smoke-test: Run smoke tests
|
|
||||||
smoke-test:
|
|
||||||
@echo "Running smoke tests..."
|
|
||||||
@python3 ./scripts/run/smoke_test.py
|
|
||||||
|
|
||||||
## script-health: Check script health
|
|
||||||
script-health:
|
|
||||||
@echo "Checking script health..."
|
|
||||||
@python3 ./scripts/run/script_health.py
|
|
||||||
|
|
||||||
## version-check: Display current version information
|
|
||||||
version-check:
|
|
||||||
@echo "Version Information:"
|
|
||||||
@echo " Manifest: $(VERSION)"
|
|
||||||
@echo " Latest CHANGELOG entry:"
|
|
||||||
@grep -m 1 "^## \[" CHANGELOG.md || echo " (not found)"
|
|
||||||
|
|
||||||
## fix-permissions: Fix script executable permissions
|
|
||||||
fix-permissions:
|
|
||||||
@echo "Fixing script permissions..."
|
|
||||||
@find scripts -type f -name "*.py" -exec chmod +x {} \;
|
|
||||||
@echo "✓ Permissions fixed"
|
|
||||||
|
|
||||||
## clean: Remove generated files and caches
|
|
||||||
clean:
|
|
||||||
@echo "Cleaning generated files..."
|
|
||||||
@rm -rf dist/
|
|
||||||
@rm -rf tests/_output/
|
|
||||||
@rm -rf .phpunit.cache/
|
|
||||||
@rm -rf .phpstan.cache/
|
|
||||||
@rm -rf .psalm/
|
|
||||||
@rm -rf .rector/
|
|
||||||
@rm -rf phpmd-cache/
|
|
||||||
@find . -type f -name ".php-cs-fixer.cache" -delete
|
|
||||||
@find . -type f -name ".phplint-cache" -delete
|
|
||||||
@find . -type f -name "*.log" -delete
|
|
||||||
@find . -type f -name ".DS_Store" -delete
|
|
||||||
@echo "✓ Cleaned"
|
|
||||||
|
|
||||||
## dev-setup: Complete development environment setup
|
|
||||||
dev-setup:
|
|
||||||
@echo "Setting up development environment..."
|
|
||||||
@$(MAKE) install
|
|
||||||
@$(MAKE) fix-permissions
|
|
||||||
@echo ""
|
|
||||||
@echo "✓ Development environment ready!"
|
|
||||||
@echo ""
|
|
||||||
@echo "Quick start:"
|
|
||||||
@echo " make validate - Run all validations"
|
|
||||||
@echo " make test - Run tests"
|
|
||||||
@echo " make quality - Check code quality"
|
|
||||||
@echo " make package - Create distribution package"
|
|
||||||
|
|
||||||
## format: Format code (PHPCS auto-fix)
|
|
||||||
format: phpcs-fix
|
|
||||||
|
|
||||||
## check: Quick check (required validations + quality)
|
|
||||||
check:
|
|
||||||
@echo "Running quick checks..."
|
|
||||||
@$(MAKE) validate-required
|
|
||||||
@$(MAKE) quality
|
|
||||||
@echo "✓ All checks passed"
|
|
||||||
|
|
||||||
## all: Run everything (validate, test, quality, package)
|
|
||||||
all:
|
|
||||||
@echo "Running complete build pipeline..."
|
|
||||||
@$(MAKE) validate
|
|
||||||
@$(MAKE) test
|
|
||||||
@$(MAKE) quality
|
|
||||||
@$(MAKE) package
|
|
||||||
@echo "✓ Complete pipeline successful"
|
|
||||||
|
|
||||||
## watch: Watch for changes and run validations (requires entr)
|
|
||||||
watch:
|
|
||||||
@echo "Watching for changes... (Ctrl+C to stop)"
|
|
||||||
@command -v entr >/dev/null 2>&1 || { echo "Error: entr not found. Install with: apt-get install entr"; exit 1; }
|
|
||||||
@find src -type f | entr -c make validate-required
|
|
||||||
|
|
||||||
## list-scripts: List all available scripts
|
|
||||||
list-scripts:
|
|
||||||
@echo "Available validation scripts:"
|
|
||||||
@find scripts/validate -type f -name "*.py" -exec basename {} \; | sort
|
|
||||||
@echo ""
|
|
||||||
@echo "Available fix scripts:"
|
|
||||||
@find scripts/fix -type f -name "*.py" -exec basename {} \; | sort
|
|
||||||
@echo ""
|
|
||||||
@echo "Available run scripts (python):"
|
|
||||||
@find scripts/run -type f -name "*.py" -exec basename {} \; | sort
|
|
||||||
|
|
||||||
## scaffold: Create new Joomla extension scaffolding
|
|
||||||
scaffold:
|
|
||||||
@echo "Create new Joomla extension scaffolding"
|
|
||||||
@echo ""
|
|
||||||
@echo "Usage: make scaffold TYPE=<type> NAME=<name> AUTHOR=<author> DESC=<description>"
|
|
||||||
@echo ""
|
|
||||||
@echo "Types: component, module, plugin, template, package"
|
|
||||||
@echo ""
|
|
||||||
@echo "Example:"
|
|
||||||
@echo " make scaffold TYPE=module NAME='My Module' AUTHOR='John Doe' DESC='Module description'"
|
|
||||||
|
|
||||||
## scaffold-component: Create a component
|
|
||||||
scaffold-component:
|
|
||||||
@python3 scripts/run/scaffold_extension.py component "$(NAME)" "$(DESC)" "$(AUTHOR)"
|
|
||||||
|
|
||||||
## scaffold-module: Create a module
|
|
||||||
scaffold-module:
|
|
||||||
@python3 scripts/run/scaffold_extension.py module "$(NAME)" "$(DESC)" "$(AUTHOR)" --client $(CLIENT)
|
|
||||||
|
|
||||||
## scaffold-plugin: Create a plugin
|
|
||||||
scaffold-plugin:
|
|
||||||
@python3 scripts/run/scaffold_extension.py plugin "$(NAME)" "$(DESC)" "$(AUTHOR)" --group $(GROUP)
|
|
||||||
|
|
||||||
## scaffold-template: Create a template
|
|
||||||
scaffold-template:
|
|
||||||
@python3 scripts/run/scaffold_extension.py template "$(NAME)" "$(DESC)" "$(AUTHOR)"
|
|
||||||
|
|
||||||
## scaffold-package: Create a package
|
|
||||||
scaffold-package:
|
|
||||||
@python3 scripts/run/scaffold_extension.py package "$(NAME)" "$(DESC)" "$(AUTHOR)"
|
|
||||||
|
|
||||||
## docs: Open documentation
|
|
||||||
docs:
|
|
||||||
@echo "Documentation files:"
|
|
||||||
@echo " README.md - Project overview"
|
|
||||||
@echo " docs/JOOMLA_DEVELOPMENT.md - Development guide"
|
|
||||||
@echo " docs/WORKFLOW_GUIDE.md - Workflow reference"
|
|
||||||
@echo " scripts/README.md - Scripts documentation"
|
|
||||||
@echo " CHANGELOG.md - Version history"
|
|
||||||
@echo " CONTRIBUTING.md - Contribution guide"
|
|
||||||
38
README.md
38
README.md
@@ -150,55 +150,17 @@ For developers and contributors working on the moko-cassiopeia template:
|
|||||||
|
|
||||||
### Quick Start for Developers
|
### Quick Start for Developers
|
||||||
|
|
||||||
Get started in minutes:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Setup development environment
|
|
||||||
make dev-setup
|
|
||||||
|
|
||||||
# Validate code
|
|
||||||
make validate-required
|
|
||||||
|
|
||||||
# Check code quality
|
|
||||||
make quality
|
|
||||||
|
|
||||||
# Create distribution package
|
|
||||||
make package
|
|
||||||
```
|
|
||||||
|
|
||||||
**New to the project?** See [Quick Start Guide](./docs/QUICK_START.md) for a 5-minute walkthrough.
|
**New to the project?** See [Quick Start Guide](./docs/QUICK_START.md) for a 5-minute walkthrough.
|
||||||
|
|
||||||
### Development Resources
|
### Development Resources
|
||||||
|
|
||||||
- **[Quick Start Guide](./docs/QUICK_START.md)** - Get up and running in 5 minutes
|
- **[Quick Start Guide](./docs/QUICK_START.md)** - Get up and running in 5 minutes
|
||||||
- **[Workflow Guide](./docs/WORKFLOW_GUIDE.md)** - Complete workflow reference with examples
|
|
||||||
- **[Joomla Development Guide](./docs/JOOMLA_DEVELOPMENT.md)** - Testing, quality checks, and deployment
|
- **[Joomla Development Guide](./docs/JOOMLA_DEVELOPMENT.md)** - Testing, quality checks, and deployment
|
||||||
- **[Contributing Guide](./CONTRIBUTING.md)** - How to contribute
|
- **[Contributing Guide](./CONTRIBUTING.md)** - How to contribute
|
||||||
|
|
||||||
### Available Tools
|
### Available Tools
|
||||||
|
|
||||||
- **Makefile**: Run `make help` to see all available commands
|
|
||||||
- **Pre-commit Hooks**: Automatic validation before commits
|
- **Pre-commit Hooks**: Automatic validation before commits
|
||||||
- **VS Code Tasks**: Pre-configured development tasks
|
|
||||||
- **GitHub Actions**: Automated CI/CD pipelines
|
|
||||||
|
|
||||||
### Cross-Platform Support
|
|
||||||
|
|
||||||
All automation is handled through the Makefile and GitHub Actions workflows for maximum cross-platform compatibility:
|
|
||||||
- **Joomla Extension Support**: Full support for Joomla 4.x and 5.x templates, components, modules, and plugins
|
|
||||||
- **Platform Detection**: Workflows automatically detect whether you're working with Joomla extensions
|
|
||||||
- **MokoStandards Integration**: Uses reusable workflows from MokoStandards for consistency
|
|
||||||
|
|
||||||
### Joomla Development Workflows
|
|
||||||
|
|
||||||
Comprehensive Joomla-aware development tools and workflows are available:
|
|
||||||
|
|
||||||
- **Extension Packaging** - Create distributable ZIP packages for Joomla or Dolibarr
|
|
||||||
- **PHP Quality Checks** - PHPStan and PHP_CodeSniffer with Joomla standards
|
|
||||||
- **Automated Testing** - Codeception framework with multiple Joomla versions
|
|
||||||
- **CI/CD Pipelines** - GitHub Actions with caching for faster builds
|
|
||||||
|
|
||||||
Run `make help` to see all available development commands.
|
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user