File tree 5 files changed +35
-18
lines changed
integTest/groovy/nebula/plugin/release
main/groovy/nebula/plugin/release
5 files changed +35
-18
lines changed Original file line number Diff line number Diff line change 1
- 4.2.0 / 2017-03-29
1
+ 4.2.0 / 2017-03-31
2
2
==================
3
3
4
4
* Calculate version in repository with no commits
5
+ * Allow pushing tags from detached branch
6
+ * Better handle branch patterns that would error out semver when put in dev version
5
7
6
8
4.0.1 / 2016-02-05
7
9
==================
Original file line number Diff line number Diff line change @@ -12,15 +12,15 @@ This plugin provides opinions and tasks for the release process provided by [gra
12
12
# Applying the plugin
13
13
14
14
plugins {
15
- id 'nebula.release' version '4.1.1 '
15
+ id 'nebula.release' version '4.2.0 '
16
16
}
17
17
18
18
-or-
19
19
20
20
buildscript {
21
21
repositories { jcenter() }
22
22
dependencies {
23
- classpath 'com.netflix.nebula:nebula-release-plugin:4.1.1 '
23
+ classpath 'com.netflix.nebula:nebula-release-plugin:4.2.0 '
24
24
}
25
25
}
26
26
apply plugin: 'nebula.nebula-release'
@@ -133,20 +133,14 @@ Tested with Oracle JDK8
133
133
134
134
| Gradle Version | Works |
135
135
| :------------: | :---: |
136
- | 2.2.1 | yes |
137
- | 2.3 | yes |
138
- | 2.4 | yes |
139
- | 2.5 | yes |
140
- | 2.6 | yes |
141
- | 2.7 | yes |
142
- | 2.8 | yes |
143
- | 2.9 | yes |
144
- | 2.10 | yes |
136
+ | 2.13 | yes |
137
+ | 3.3 | yes |
138
+ | 3.4.1 | yes |
145
139
146
140
LICENSE
147
141
=======
148
142
149
- Copyright 2014-2016 Netflix, Inc.
143
+ Copyright 2014-2017 Netflix, Inc.
150
144
151
145
Licensed under the Apache License, Version 2.0 (the "License");
152
146
you may not use this file except in compliance with the License.
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ abstract class GitVersioningIntegrationSpec extends IntegrationSpec {
27
27
28
28
def setup () {
29
29
def origin = new File (projectDir. parent, " ${ projectDir.name} .git" )
30
+ if (origin. exists()) {
31
+ origin. deleteDir()
32
+ }
30
33
origin. mkdirs()
31
34
32
35
[' build.gradle' , ' settings.gradle' ]. each {
Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ package nebula.plugin.release
17
17
18
18
import nebula.plugin.bintray.NebulaBintrayPublishingPlugin
19
19
import org.ajoberstar.grgit.Tag
20
- import org.ajoberstar.grgit.operation.BranchAddOp
21
- import org.ajoberstar.grgit.operation.BranchChangeOp
22
20
import org.gradle.api.plugins.JavaPlugin
23
21
import org.gradle.internal.impldep.com.amazonaws.util.Throwables
24
22
@@ -525,4 +523,24 @@ class ReleasePluginIntegrationSpec extends GitVersioningIntegrationSpec {
525
523
526
524
originGit. branch. list(). size() == 1
527
525
}
526
+
527
+ def ' branches with slashes that do not match specified patterns do not fail builds' () {
528
+ git. checkout(branch : ' dev/robtest' , createBranch : true )
529
+
530
+ when :
531
+ def version = inferredVersionForTask(' devSnapshot' )
532
+
533
+ then :
534
+ version == dev(' 0.1.0-dev.2+dev.robtest.' )
535
+ }
536
+
537
+ def ' branches with dashes that do not match specified patterns do not fail builds' () {
538
+ git. checkout(branch : ' dev-robtest' , createBranch : true )
539
+
540
+ when :
541
+ def version = inferredVersionForTask(' devSnapshot' )
542
+
543
+ then :
544
+ version == dev(' 0.1.0-dev.2+dev.robtest.' )
545
+ }
528
546
}
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2014-2015 Netflix, Inc.
2
+ * Copyright 2014-2017 Netflix, Inc.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -44,8 +44,8 @@ class NetflixOssStrategies {
44
44
needsBranchMetadata = false
45
45
}
46
46
}
47
- def shortenedBranch = (state. currentBranch. name =~ nebulaReleaseExtension. shortenedBranchPattern)[0 ][1 ]
48
- shortenedBranch = shortenedBranch. replaceAll(' _ ' , ' .' )
47
+ String shortenedBranch = (state. currentBranch. name =~ nebulaReleaseExtension. shortenedBranchPattern)[0 ][1 ]
48
+ shortenedBranch = shortenedBranch. replaceAll(/ [_ \/ -] / , ' .' )
49
49
def metadata = needsBranchMetadata ? " ${ shortenedBranch} .${ state.currentHead.abbreviatedId} " : state. currentHead. abbreviatedId
50
50
state. copyWith(inferredBuildMetadata : metadata)
51
51
}
You can’t perform that action at this time.
0 commit comments