File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -102,9 +102,11 @@ Options include:
102
102
103
103
# -- Extract project details --
104
104
105
- projectDetails=$( mvn -N -Dexec.executable=' echo' -Dexec.args=' ${project.version}::${project.parent.groupId}:${project.parent.artifactId}:${project.parent.version}' exec:exec -q)
106
- parentGAV=${projectDetails#*:: }
107
- currentVersion=${projectDetails%::* }
105
+ projectDetails=$( mvn -N -Dexec.executable=' echo' -Dexec.args=' ${project.version}/${license.licenseName}/${project.parent.groupId}:${project.parent.artifactId}:${project.parent.version}' exec:exec -q)
106
+ currentVersion=${projectDetails%%/* }
107
+ projectDetails=${projectDetails#*/ }
108
+ licenseName=${projectDetails%%/* }
109
+ parentGAV=${projectDetails#*/ }
108
110
109
111
# -- Sanity checks --
110
112
@@ -171,11 +173,13 @@ test "$FETCH_HEAD" = "$(git merge-base $FETCH_HEAD $HEAD)" ||
171
173
die " 'master' is not up-to-date"
172
174
173
175
# Ensure license headers are up-to-date.
174
- mvn license:update-project-license license:update-file-header &&
175
- git add LICENSE.txt ||
176
- die ' Failed to update copyright blurbs'
177
- no_changes_pending ||
178
- die ' Copyright blurbs needed an update -- commit changes and try again'
176
+ test -z " $licenseName " -o " $licenseName " = " N/A" || {
177
+ mvn license:update-project-license license:update-file-header &&
178
+ git add LICENSE.txt ||
179
+ die ' Failed to update copyright blurbs'
180
+ no_changes_pending ||
181
+ die ' Copyright blurbs needed an update -- commit changes and try again'
182
+ }
179
183
180
184
# Prepare new release without pushing (requires the release plugin >= 2.1).
181
185
$DRY_RUN mvn $BATCH_MODE release:prepare -DpushChanges=false -Dresume=false $TAG \
You can’t perform that action at this time.
0 commit comments