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

pre release identifier - keep & bump #11

Merged
merged 10 commits into from
Oct 22, 2012
Merged

Conversation

salzig
Copy link
Contributor

@salzig salzig commented Oct 21, 2012

Added the option to bump pre.
1.2.3 -> 1.2.3-alpha
1.2.3-alpha -> 1.2.3-beta
1.2.3-beta -> 1.2.3-rc

bump major and bump minor will reset pre release identifier
to nothing.
I would prefer 'alpha', opinions?

OPTIONS = BUMPS | ["current"]
VERSION_REGEX = /(\d+\.\d+\.\d+)/
VERSION_REGEX = /(\d+\.\d+\.\d+(?:-(?:alpha|beta|rc))?)/
Copy link
Collaborator

Choose a reason for hiding this comment

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

what I usually see is 1.2.3.alpha not -alpha (e.g. rails)

Copy link
Collaborator

Choose a reason for hiding this comment

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

to dry it up maybe reuse PRERELEASE -> #{PRERELEASE.compact.join("|")}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SemVer names '-' as separator for prerelease- and '+' for build- identifier.
gem versionomy handels many different formats.
Hard to say what's the "right way" to do it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

rake just went 0.9.3.beta.1https://rubygems.org/gems/rake/versions/0.9.3.beta.1
:D
I definitely like SemVer as a standard, and as long as it works with
rubygems (aka I can install --pre) then it does not really matter :)

On Sun, Oct 21, 2012 at 8:52 AM, Ben notifications@github.com wrote:

In lib/bump.rb:

 OPTIONS = BUMPS | ["current"]
  • VERSION_REGEX = /(\d+.\d+.\d+)/
  • VERSION_REGEX = /(\d+.\d+.\d+(?:-(?:alpha|beta|rc))?)/

SemVer http://semver.org/ names '-' as separator for prerelease- and
'+' for build- identifier.
gem versionomy https://github.com/dazuma/versionomy handels many
different formats.
Hard to say what's the "right way" to do it.


Reply to this email directly or view it on GitHubhttps://github.com//pull/11/files#r1898754.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"The version string can contain numbers and periods, such as 1.0.0. A gem is a ‘prerelease’ gem if the version has a letter in it, such as 1.0.0.pre." - RubyGems Specification

also good to know RationalVersioningPolicy and Summary

@gregorym
Copy link
Owner

@salzig Can you add documentation to the README plz.

gregorym added a commit that referenced this pull request Oct 22, 2012
pre release identifier - keep & bump
@gregorym gregorym merged commit 2266679 into gregorym:master Oct 22, 2012
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.

3 participants