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

Add support for pre-release versions #43

Merged
merged 2 commits into from
Jan 7, 2024
Merged

Conversation

jcouball
Copy link
Member

@jcouball jcouball commented Jan 6, 2024

Add the ability for create-github-release to create a release with a pre-release version as
defined in the Semver 2.0.0 spec.
An example of a pre-release version is 1.0.0-beta.1.

Pre-release versions have a lower precedence than their associated normal version.
This means the pre-release version sorts before the associated release version. For
example, 1.0.0-beta.1 comes before 1.0.0. A pre-release version indicates that
the version is unstable and might not yet satisfy the intended compatibility
requirements as denoted by its associated normal version

This gem limits pre-release versions to the form MAJOR.MINOR.PATCH-PRERELEASE where
PRERELEASE can ONLY have the following form: TYPE.DIGITS. TYPE is any text
string allowed in the Semver 2.0.0 spec and is typically 'alpha', 'beta', 'pre',
'rc', etc. DIGITS is a numeric identifier that does not include leading zeroes.

Create the first pre-release version for the next minor release

If the current release is 1.0.0, the command to create a pre-release for the next minor version where the pre-release type is alpha would be:

create-github-release minor --pre --pre-type=alpha

This will create a release whose version is 1.1.0-alpha.1.

Create subsequent pre-releases

If the current release is 1.1.0-alpha.1, the command to create the next alpha release would be:

create-github-release pre

This will create a release whose version is 1.1.0-alpha.2.

Change the pre-release type

If the current release version is 1.1.0-alpha.2, the command to create the release where the pre-release type is beta would be:

create-github-release pre --pre-type=beta

This will create a release whose version is 1.1.0-beta.1.

Create the release after pre-release

If the current release version is 1.1.0-beta.1, the command to create the normal / non-pre-release would be:

create-github-release release

This will create a release whose version is 1.1.0.

@jcouball jcouball requested a review from a team as a code owner January 6, 2024 16:03

# Validates a set of options after the options have been fully initialized
# @api private
class CommandLineOptionsValidator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class CommandLineOptionsValidator has 21 methods (exceeds 20 allowed). Consider refactoring.

Copy link

codeclimate bot commented Jan 7, 2024

Code Climate has analyzed commit 3b0d80f and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 100.0% (0.0% change).

View more on Code Climate.

@jcouball jcouball merged commit 80da449 into main Jan 7, 2024
8 checks passed
@jcouball jcouball deleted the pre_release_releases branch January 7, 2024 20:57
@jcouball jcouball mentioned this pull request Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant