Skip to content

Commit

Permalink
Merge pull request #28 from rspieldenner/bugfix
Browse files Browse the repository at this point in the history
Bugfix
  • Loading branch information
rspieldenner committed Sep 18, 2015
2 parents d3159db + f29fcc7 commit 98a0324
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
3.0.2 / 2015-09-18
==================

* BUGFIX: Allow release from rc tag

3.0.1 / 2015-09-09
==================

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ This plugin provides opinions and tasks for the release process provided by [gra
# Applying the plugin

plugins {
id 'nebula.nebula-release' version '3.0.1'
id 'nebula.nebula-release' version '3.0.2'
}

-or-

buildscript {
repositories { jcenter() }
dependencies {
classpath 'com.netflix.nebula:nebula-release-plugin:3.0.1'
classpath 'com.netflix.nebula:nebula-release-plugin:3.0.2'
}
}
apply plugin: 'nebula.nebula-release'
Expand Down Expand Up @@ -129,6 +129,7 @@ Tested with Oracle JDK8
| 2.4 | yes |
| 2.5 | yes |
| 2.6 | yes |
| 2.7 | yes |

LICENSE
=======
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,16 @@ class ReleasePluginIntegrationSpec extends GitVersioningIntegrationSpec {
new File(projectDir, "build/libs/${moduleName}-42.5.3.jar").exists()
}

def 'use last tag for rc'() {
git.tag.add(name: 'v3.1.2-rc.1')

when:
runTasksSuccessfully('candidate', '-Prelease.useLastTag=true')

then:
new File(projectDir, "build/libs/${moduleName}-3.1.2-rc.1.jar").exists()
}

def 'skip useLastTag if false'() {
when:
runTasksSuccessfully('final', '-Prelease.useLastTag=345')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*/
package nebula.plugin.release

import nebula.plugin.bintray.BintrayPlugin
import org.gradle.api.plugins.JavaPlugin
import org.gradle.api.publish.plugins.PublishingPlugin

class ReleasePluginMultiprojectIntegrationSpec extends GitVersioningIntegrationSpec {
@Override
Expand Down Expand Up @@ -92,4 +94,19 @@ class ReleasePluginMultiprojectIntegrationSpec extends GitVersioningIntegrationS
it =~ /test-release-client-0\.1\.0-dev\.2\+testexample\./
} != null
}

def 'tasks does not fail'() {
given:
buildFile << """\
allprojects {
${applyPlugin(PublishingPlugin)}
${applyPlugin(BintrayPlugin)}
}
""".stripIndent()
when:
runTasksSuccessfully('tasks', '--all')

then:
noExceptionThrown()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class OverrideStrategies {
@Override
ReleaseVersion infer(Project project, Grgit grgit) {
def locate = new NearestVersionLocator().locate(grgit)
return new ReleaseVersion(locate.getNormal().normalVersion, null, false)
return new ReleaseVersion(locate.any.toString(), null, false)
}
}

Expand Down

0 comments on commit 98a0324

Please sign in to comment.