@@ -30,6 +30,7 @@ SCIJAVA_THIRDPARTY_REPOSITORY=$SCIJAVA_BASE_REPOSITORY/thirdparty
3030# Parse command line options.
3131BATCH_MODE=--batch-mode
3232SKIP_VERSION_CHECK=
33+ SKIP_LICENSE_UPDATE=
3334SKIP_PUSH=
3435SKIP_GPG=
3536TAG=
4647 --dry-run) DRY_RUN=echo;;
4748 --no-batch-mode) BATCH_MODE=;;
4849 --skip-version-check) SKIP_VERSION_CHECK=t;;
50+ --skip-license-update) SKIP_LICENSE_UPDATE=t;;
4951 --skip-push) SKIP_PUSH=t;;
5052 --tag=* )
5153 ! git rev-parse --quiet --verify refs/tags/" ${1# --* =} " ||
@@ -90,6 +92,7 @@ Where <version> is the version to release. If omitted, it will prompt you.
9092Options include:
9193 --dry-run - Simulate the release without actually doing it.
9294 --skip-version-check - Violate SemVer version numbering intentionally.
95+ --skip-license-update - Skips update of the copyright blurbs.
9396 --skip-push - Do not push to the remote git repository.
9497 --dev-version=<x.y.z> - Specify next development version explicitly;
9598 e.g.: if you release 2.0.0-beta-1, by default
@@ -173,12 +176,17 @@ test "$FETCH_HEAD" = "$(git merge-base $FETCH_HEAD $HEAD)" ||
173176 die " 'master' is not up-to-date"
174177
175178# Ensure license headers are up-to-date.
176- test -z " $licenseName " -o " $licenseName " = " N/A" || {
179+ test " $SKIP_LICENSE_UPDATE " -o -z " $licenseName " -o " $licenseName " = " N/A" || {
177180 mvn license:update-project-license license:update-file-header &&
178181 git add LICENSE.txt ||
179182 die ' Failed to update copyright blurbs'
180183 no_changes_pending ||
181- die ' Copyright blurbs needed an update -- commit changes and try again'
184+ die ' Copyright blurbs needed an update -- commit changes and try again.
185+ Or if the license headers are being added erroneously to certain files,
186+ exclude them by setting license.excludes in your POM; e.g.:
187+
188+ <license.excludes>**/script_templates/**</license.excludes>
189+ '
182190}
183191
184192# Prepare new release without pushing (requires the release plugin >= 2.1).
0 commit comments