wp-github-plugin
v1.0.4
Published
Update your plugins via github
Downloads
14
Readme
wp-github-plugin
Sync your plugin version across WordPress, package.json, and composer.json – and auto-tag your GitHub releases.
Perfect for WordPress plugins that update directly via GitHub (e.g. with your own custom updater or GitHub Updater).
Features
- Extracts version from
plugin.phporstyle.css - Updates
package.jsonandcomposer.jsonto match - Automatically creates a
vX.X.XGit tag - Pushes the tag to GitHub
- Easy CLI usage with
npx
Installation & Usage
No need to install – just run:
npx wp-github-plugin ./plugin.php
or
npm install --save-dev wp-github-pluginand add to your package.json the following lines (replacing plugin.php with your actual plugin file)
"scripts": {
"version-sync": "wp-github-plugin ./plugin.php",
"release": "wp-github-plugin ./plugin.php npm run version-sync --tag"
}Requirements
Your Wordpress plugin header must include a version line like this:
/*
* Plugin Name: My Plugin
* Version: 1.2.3
* ...
*/Testing
Tests are located in the tests/ folder. To run them:
npm install
npm test
Uses Jest with mocked child_process.execSync.