Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version increment command for selected targets. #88

Open
ampersarnie opened this issue Jul 17, 2023 · 2 comments
Open

Version increment command for selected targets. #88

ampersarnie opened this issue Jul 17, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@ampersarnie
Copy link
Member

ampersarnie commented Jul 17, 2023

Having a command that allows for incrementing the version of a specific plugin would help with how we define and perform semver increments.

Example Command Usage

Patch

build-tools version patch
# 1.2.2 → 1.2.3

Minor

build-tools version minor
# 1.2.3 → 1.3.0

Major

build-tools version major
# 1.3.0 → 2.0.0

Beta

build-tools version major:beta
# 2.0.0 → 3.0.0-beta.1

build-tools version beta
# 3.0.0-beta.1 → 3.0.0-beta.2

Increment Multiple

build-tools version minor my-plugin,my-theme
# my-plugin: 2.0.0 → 2.1.0
# my-theme: 3.4.0 → 3.5.0
@ampersarnie ampersarnie converted this from a draft issue Jul 17, 2023
@ampersarnie ampersarnie self-assigned this Jul 17, 2023
@ampersarnie ampersarnie added the enhancement New feature or request label Jul 17, 2023
@jordanharris-6 jordanharris-6 self-assigned this May 17, 2024
@jordanharris-6
Copy link
Contributor

@ampersarnie Should this have the same functionality as NPM-VERSION i.e | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] ?

I noticed npm version is only compatible with package.json files so couldn't even wrap this in it as it wouldn't work with PHP files.

@ampersarnie
Copy link
Member Author

Yeah they should, however, some of the naming between what was listed in the description and npm doesn't match word for word but are the same. i.e. premajor = major:beta

You can ignore the from-git version. To help with that comparison, here's what you can use:

NPM/semver Build Tools Example Result (x|y)
major major x.0.0
minor minor 1.x.0
patch patch 1.0.x
premajor major:beta x.0.0-beta.y
preminor minor:beta 1.x.0-beta.y
prepatch patch:beta 1.0.x-beta.y

If you're unsure on what these versions mean, take a look at our internal RFC on Semantic Versioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To do
Development

No branches or pull requests

2 participants