-
Notifications
You must be signed in to change notification settings - Fork 0
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
feature/markNextVersionTask-creates-next-version-with-incrementer #1
base: master
Are you sure you want to change the base?
feature/markNextVersionTask-creates-next-version-with-incrementer #1
Conversation
jplucinski
commented
May 14, 2018
- markNextVersionTask can create next version with incrementer
* markNextVersionTask can create next version with incrementer
def version = nextVersionRules.nextVersion | ||
def currentVersion = Version.valueOf(versionConfig.version) | ||
|
||
if (nextVersionRules.versionIncrementer){ |
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.
space after )
@@ -64,7 +64,7 @@ enum PredefinedVersionIncrementer { | |||
PredefinedVersionIncrementer creator = values().find { it.name == name } | |||
if (creator == null) { | |||
throw new IllegalArgumentException("There is no predefined version incrementer with $name name. " + | |||
"You can choose from: ${values().collect { it.name }}"); |
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.
crucial changes ;) that semicolons...
@@ -47,6 +47,10 @@ class ScmService { | |||
} | |||
} | |||
|
|||
ScmPosition position(){ |
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.
space after ()
docs/configuration/next_version.rst
Outdated
# ./gradlew cV | ||
2.0.0-SNAPSHOT | ||
|
||
To create next version marker use ``markNextVersion`` task along with obligatory command line option ``release.version``. | ||
To create next version marker use ``markNextVersion``. Without parameters next version will be created with default version incrementer - incrementMinor, | ||
witch can be overwritten with ``release.incrementer`` parameter. |
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.
Burn her, burn her!
docs/configuration/next_version.rst
Outdated
# ./gradlew cV | ||
2.0.0-SNAPSHOT | ||
|
||
To create next version marker use ``markNextVersion`` task along with obligatory command line option ``release.version``. | ||
To create next version marker use ``markNextVersion``. Without parameters next version will be created with default version incrementer - incrementMinor, |
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.
``incrementMinor``
?
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.
it's not Markdown, https://pl.wikipedia.org/wiki/ReStructuredText
def version = nextVersionRules.nextVersion | ||
def currentVersion = Version.valueOf(versionConfig.version) | ||
|
||
if (nextVersionRules.versionIncrementer){ |
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.
Formatting :)
@@ -47,6 +47,10 @@ class ScmService { | |||
} | |||
} | |||
|
|||
ScmPosition position(){ |
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.
Formatting
if (nextVersion == null && project.hasProperty(DEPRECATED_NEXT_VERSION_PROPERTY)) { | ||
project.logger.warn("Using deprecated parameter: $DEPRECATED_NEXT_VERSION_PROPERTY! Use $NEXT_VERSION_PROPERTY instead.") | ||
nextVersion = project.property(DEPRECATED_NEXT_VERSION_PROPERTY) | ||
} | ||
|
||
return new NextVersionProperties(nextVersion: nextVersion, suffix: config.suffix, separator: config.separator, | ||
return new NextVersionProperties(nextVersion: nextVersion, versionIncrementer: nextVersionIncrementer, suffix: config.suffix, separator: config.separator, |
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.
This is technically a public constructor. How will it behave if we omit this parameter?
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.
I updated all references, moreover in project instances of NextVersionfactory are created with builder NextVersionPropertiesBuilder.
* added examples in doc * fixed formatting
* using undecorated version for incrementer * more explicit logic * services clean up
* move incrementer resolving to nextversionmaker * fix for unit test
Bug in integration tests setup code caused project.version to be assigned before adding custom code. This means that no version reading customizations were active in integraiton tests.
This enables better testing and isolation for pretty sophisticated version sorting logic.
Specifies precedence of tags when multiple tags on single commit: * when on head: use highest normal; if no normal - first alpha * otherwise: use highest of all
…ersion-with-incrementer
* remove VersionConfig dependencies from NextVersionPropertiesFactory