Skip to content

Commit 98a0324

Browse files
committed
Merge pull request #28 from rspieldenner/bugfix
Bugfix
2 parents d3159db + f29fcc7 commit 98a0324

5 files changed

Lines changed: 36 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
3.0.2 / 2015-09-18
2+
==================
3+
4+
* BUGFIX: Allow release from rc tag
5+
16
3.0.1 / 2015-09-09
27
==================
38

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ This plugin provides opinions and tasks for the release process provided by [gra
1111
# Applying the plugin
1212

1313
plugins {
14-
id 'nebula.nebula-release' version '3.0.1'
14+
id 'nebula.nebula-release' version '3.0.2'
1515
}
1616

1717
-or-
1818

1919
buildscript {
2020
repositories { jcenter() }
2121
dependencies {
22-
classpath 'com.netflix.nebula:nebula-release-plugin:3.0.1'
22+
classpath 'com.netflix.nebula:nebula-release-plugin:3.0.2'
2323
}
2424
}
2525
apply plugin: 'nebula.nebula-release'
@@ -129,6 +129,7 @@ Tested with Oracle JDK8
129129
| 2.4 | yes |
130130
| 2.5 | yes |
131131
| 2.6 | yes |
132+
| 2.7 | yes |
132133

133134
LICENSE
134135
=======

src/integTest/groovy/nebula/plugin/release/ReleasePluginIntegrationSpec.groovy

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,16 @@ class ReleasePluginIntegrationSpec extends GitVersioningIntegrationSpec {
378378
new File(projectDir, "build/libs/${moduleName}-42.5.3.jar").exists()
379379
}
380380

381+
def 'use last tag for rc'() {
382+
git.tag.add(name: 'v3.1.2-rc.1')
383+
384+
when:
385+
runTasksSuccessfully('candidate', '-Prelease.useLastTag=true')
386+
387+
then:
388+
new File(projectDir, "build/libs/${moduleName}-3.1.2-rc.1.jar").exists()
389+
}
390+
381391
def 'skip useLastTag if false'() {
382392
when:
383393
runTasksSuccessfully('final', '-Prelease.useLastTag=345')

src/integTest/groovy/nebula/plugin/release/ReleasePluginMultiprojectIntegrationSpec.groovy

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
*/
1616
package nebula.plugin.release
1717

18+
import nebula.plugin.bintray.BintrayPlugin
1819
import org.gradle.api.plugins.JavaPlugin
20+
import org.gradle.api.publish.plugins.PublishingPlugin
1921

2022
class ReleasePluginMultiprojectIntegrationSpec extends GitVersioningIntegrationSpec {
2123
@Override
@@ -92,4 +94,19 @@ class ReleasePluginMultiprojectIntegrationSpec extends GitVersioningIntegrationS
9294
it =~ /test-release-client-0\.1\.0-dev\.2\+testexample\./
9395
} != null
9496
}
97+
98+
def 'tasks does not fail'() {
99+
given:
100+
buildFile << """\
101+
allprojects {
102+
${applyPlugin(PublishingPlugin)}
103+
${applyPlugin(BintrayPlugin)}
104+
}
105+
""".stripIndent()
106+
when:
107+
runTasksSuccessfully('tasks', '--all')
108+
109+
then:
110+
noExceptionThrown()
111+
}
95112
}

src/main/groovy/nebula/plugin/release/OverrideStrategies.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class OverrideStrategies {
5959
@Override
6060
ReleaseVersion infer(Project project, Grgit grgit) {
6161
def locate = new NearestVersionLocator().locate(grgit)
62-
return new ReleaseVersion(locate.getNormal().normalVersion, null, false)
62+
return new ReleaseVersion(locate.any.toString(), null, false)
6363
}
6464
}
6565

0 commit comments

Comments
 (0)