File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,9 +102,11 @@ Options include:
102102
103103# -- Extract project details --
104104
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#*/ }
108110
109111# -- Sanity checks --
110112
@@ -171,11 +173,13 @@ test "$FETCH_HEAD" = "$(git merge-base $FETCH_HEAD $HEAD)" ||
171173 die " 'master' is not up-to-date"
172174
173175# 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+ }
179183
180184# Prepare new release without pushing (requires the release plugin >= 2.1).
181185$DRY_RUN mvn $BATCH_MODE release:prepare -DpushChanges=false -Dresume=false $TAG \
You can’t perform that action at this time.
0 commit comments