- Update README.md to remove client fork sections - Update CLAUDE.md to remove client fork file references - Update copilot-instructions.md to remove client fork section - Update templates/README.md for empty directory - Update scripts/README.md to remove create-client-fork.sh - Update docs/README.md to remove CLIENT_FORK_WORKFLOW.md references Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
5.9 KiB
Scripts — MokoCassiopeia
This directory contains utility scripts for building, releasing, and managing the MokoCassiopeia Joomla template.
Available Scripts
build-release.sh
Purpose: Build a release package for MokoCassiopeia template.
Usage:
# Build with auto-detected version from templateDetails.xml
./scripts/build-release.sh
# Build with specific version
./scripts/build-release.sh 03.08.03
What it does:
- Creates a
build/directory - Copies template files from
src/ - Copies media files from
src/media/tomedia/ - Creates a ZIP package:
mokocassiopeia-src-{version}.zip - Generates SHA-256 and MD5 checksums
- Outputs package location and checksums
Output:
build/mokocassiopeia-src-{version}.zip- Installation packagebuild/mokocassiopeia-src-{version}.zip.sha256- SHA-256 checksumbuild/mokocassiopeia-src-{version}.zip.md5- MD5 checksum
Requirements:
rsyncfor file copyingzipfor package creationsha256sumandmd5sumfor checksums
Automated Workflows
The repository includes GitHub Actions workflows that automate the build and release process:
.github/workflows/release.yml
Purpose: Automated release creation when tags are pushed.
Triggers:
- Push of version tag (e.g.,
03.08.03) - Manual workflow dispatch with version input
Process:
- Checks out repository
- Sets up PHP environment
- Installs dependencies (if composer.json exists)
- Updates version numbers in manifest files
- Creates package structure
- Builds ZIP package
- Generates checksums
- Creates GitHub Release with artifacts
Usage:
# Create and push a tag
git tag 03.08.04
git push origin 03.08.04
# Or use GitHub UI to run manually
.github/workflows/auto-update-sha.yml
Purpose: Automatically update SHA-256 hash in updates.xml after a release is published.
Triggers:
- GitHub Release published
- Manual workflow dispatch with tag input
Process:
- Downloads the release package
- Calculates SHA-256 hash
- Updates
updates.xmlwith:- New version number
- Current date
- Download URL
- SHA-256 hash
- Commits and pushes changes to main branch
Benefits:
- Ensures
updates.xmlalways has correct SHA-256 hash - Enables Joomla update server functionality
- Reduces manual update errors
- Automates security verification
Release Process
Manual Release (Local Build)
-
Update version numbers:
# Update these files manually: # - src/templateDetails.xml # - updates.xml # - CHANGELOG.md -
Build package:
./scripts/build-release.sh 03.08.04 -
Test package:
- Install ZIP in Joomla test environment
- Verify all features work correctly
-
Create GitHub Release:
- Go to GitHub Releases
- Click "Create a new release"
- Upload the ZIP, SHA256, and MD5 files
- Add release notes from CHANGELOG.md
-
Update updates.xml:
- Copy SHA-256 hash from
.sha256file - Update
updates.xmlwith new hash - Commit and push changes
- Copy SHA-256 hash from
Automated Release (GitHub Actions)
-
Update version numbers:
# Update these files in a branch: # - src/templateDetails.xml # - CHANGELOG.md git checkout -b release/03.08.04 # Make changes git commit -m "chore: Prepare release 03.08.04" git push origin release/03.08.04 -
Create and merge PR:
- Create PR from release branch
- Review changes
- Merge to main
-
Create and push tag:
git checkout main git pull git tag 03.08.04 git push origin 03.08.04 -
Automated process:
- GitHub Actions builds package automatically
- Creates GitHub Release with artifacts
auto-update-shaworkflow updatesupdates.xml
-
Verify:
- Check GitHub Release is created
- Verify
updates.xmlhas correct SHA-256 - Test Joomla update server
Development Workflow
Testing Local Builds
# Build current version
./scripts/build-release.sh
# Install in Joomla
# Navigate to Extensions > Manage > Install > Upload Package File
# Select: build/mokocassiopeia-src-{version}.zip
Pre-Release Checklist
- All code changes merged to main
- Version numbers updated:
src/templateDetails.xmlCHANGELOG.md
- CHANGELOG.md updated with release notes
- Tests passing
- Documentation updated
- Local build tested in Joomla
Troubleshooting
Build Fails
Problem: rsync: command not found
# Ubuntu/Debian
sudo apt-get install rsync
# macOS
brew install rsync
Problem: zip: command not found
# Ubuntu/Debian
sudo apt-get install zip
# macOS (usually pre-installed)
brew install zip
GitHub Actions Fails
Problem: Release workflow fails on tag push
Check:
- Tag format matches pattern:
[0-9][0-9].[0-9][0-9].[0-9][0-9] - Repository has write permissions for GITHUB_TOKEN
src/andsrc/media/directories exist
Problem: auto-update-sha fails
Check:
- Release package was published successfully
- Workflow has write permissions
- Package naming matches expected format
File Structure
scripts/
├── README.md # This file
└── build-release.sh # Local build script
.github/workflows/
├── release.yml # Automated release workflow
└── auto-update-sha.yml # SHA hash update workflow
Contributing
When adding new scripts:
- Add GPL-3.0-or-later license header
- Include FILE INFORMATION block
- Add usage documentation in this README
- Make scripts executable:
chmod +x scripts/your-script.sh - Test thoroughly before committing
Support
- Issues: GitHub Issues
- Email: hello@mokoconsulting.tech
- Documentation: docs/
License
All scripts are licensed under GPL-3.0-or-later.
Copyright (C) 2026 Moko Consulting