wp-version-upgrade

1.0.3 • Public • Published

Overview

This package serves as a versioning tool for your WordPress plugins or themes, allowing you to update or "bump" your version number before you release an update. It utilizes semantic versioning and, by default, will increment the "patch" version.

The package also offers a feature that allows you to manually set the version, which could be beneficial when incorporated into Continuous Integration/Continuous Deployment (CI/CD) pipelines, allowing for build version inclusion.

Demo of CLI

How to Use

Execute these commands within the root directory of your plugin or theme:

npx wp-version-upgrade
npx wp-version-upgrade --file=your-plugin.php

npx wp-version-upgrade --patch
npx wp-version-upgrade --minor
npx wp-version-upgrade --major
npx wp-version-upgrade --build=123
npx wp-version-upgrade --force=1.1.20-alpha.1

Each command initiates a different function:

  • npx wp-version-upgrade: runs the script, updating the "patch" version by default.
  • npx wp-version-upgrade --file=your-plugin.php: specifies the file to update.
  • npx wp-version-upgrade --patch: increments the patch version number. (1.0.x)
  • npx wp-version-upgrade --minor: increments the minor version number. (1.x.0)
  • npx wp-version-upgrade --major: increments the major version number. (x.0.0)
  • npx wp-version-upgrade --build=123: adds the build number to the version. (1.0.0-123)
  • npx wp-version-upgrade --force=1.1.20-alpha.1: forces the version to the specified version (in this case, 1.1.20-alpha.1).

Package Sidebar

Install

npm i wp-version-upgrade

Weekly Downloads

11

Version

1.0.3

License

MIT

Unpacked Size

7.17 kB

Total Files

7

Last publish

Collaborators

  • roman-axe-web