Commit 8d7f0614 authored by Charmed Baryon's avatar Charmed Baryon

Skip CI on release builds by default.

Adds skip-ci tags on release intermediate commits by default. Fixes #2.
parent fb8c62ab
Pipeline #79563285 passed with stages
in 11 minutes and 31 seconds
......@@ -272,6 +272,18 @@ the version numbers of a release via environment variables rather than just prop
declared then you can use the variables `GRADLE_RELEASE_VERSION` and `GRADLE_RELEASE_NEW_VERSION` instead. Automatic
versioning is enabled when both environment variables are present.
Java Modern assumes you are using an automated continuous integration-based method for running your release process.
A release build is assumed to have already undergone CI pipelines, and so by default Java Modern attempts to avoid
running CI again (particularly on intermediate commits in the release process). When attempting to skip the CI runs it
will prepend "[ci skip] [skip ci]" to your commit message, which common CI platforms use to avoid triggering a build.
This behavior can be disabled by using:
```groovy
javaModern {
skipReleaseCi = false
}
```
### Licence Management
Includes the Kordamp licensing plugin. This integrates license header checks into the `build` task and is preconfigured
to use the file `gradle/LICENSE_HEADER` in your project. It can also automatically add matching headers.
......
group = org.proticity.gradle
version = 0.1.12
version = 0.1.13
sourceCompatibility = 1.8
targetCompatibility = 1.8
......
......@@ -26,7 +26,7 @@ buildscript {
}
}
dependencies {
classpath 'org.proticity.gradle:java-modern-gradle-plugin:0.1.12'
classpath 'org.proticity.gradle:java-modern-gradle-plugin:0.1.13'
}
}
......
......@@ -26,7 +26,7 @@ buildscript {
}
}
dependencies {
classpath 'org.proticity.gradle:java-modern-gradle-plugin:0.1.12'
classpath 'org.proticity.gradle:java-modern-gradle-plugin:0.1.13'
}
}
......
......@@ -36,6 +36,11 @@ class JavaModernExtension {
*/
String mainBranch = 'master'
/**
* Whether to skip CI on release commits (defaults to true).
*/
boolean skipReleaseCi = true;
/**
* The build project.
*/
......
......@@ -257,6 +257,9 @@ class JavaModernPlugin implements Plugin<Project> {
project.plugins.apply(ReleasePlugin)
project.extensions.findByType(ReleaseExtension).with {
failOnUnversionedFiles = false
if (ext.skipReleaseCi) {
preCommitText = '[ci skip] [skip ci] '
}
}
// Configure bug checks
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment