-
Notifications
You must be signed in to change notification settings - Fork 122
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
feat: Support for prerelease identifiers #102
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,8 @@ module.exports = function(grunt) { | |
exactVersionToSet = false; | ||
} | ||
|
||
var prereleaseIdentifier = grunt.option('preid'); | ||
|
||
var done = this.async(); | ||
var queue = []; | ||
var next = function() { | ||
|
@@ -99,7 +101,7 @@ module.exports = function(grunt) { | |
var version = null; | ||
var content = grunt.file.read(file).replace(VERSION_REGEXP, function(match, prefix, parsedVersion, suffix) { | ||
gitVersion = gitVersion && parsedVersion + '-' + gitVersion; | ||
version = exactVersionToSet || gitVersion || semver.inc(parsedVersion, versionType || 'patch'); | ||
version = exactVersionToSet || gitVersion || semver.inc(parsedVersion, versionType || 'patch', false, prereleaseIdentifier); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that is one long line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can line break at the ors. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please do |
||
return prefix + version + suffix; | ||
}); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not fond of
preid
since its hard to read unless you know what it means. not sure what else to name it thoughThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I named this to match the command line argument in node-semver
bromanko/node-semver@56258fa#diff-a342e6cbc646e03dc5b605ab42f5f28aR51
If you'd prefer something different I would suggest
prereleaseId
just let me know and I'll update it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if
preId
is better.prereleasePrefix
would be nice but its so long