nebula-release-plugin icon indicating copy to clipboard operation
nebula-release-plugin copied to clipboard

Only run specific tasks

Open VincentSch4rf opened this issue 6 years ago • 1 comments

Hi, I just started using this plugin and would like to use the versioning and checks in another task. The problem I cannot get across, is that I can‘t find the task, that is generating the version. Can anyone help me to understand the architecture of the plugin?

VincentSch4rf avatar May 07 '19 14:05 VincentSch4rf

I figured it out myself. So for everyone wanting to define a release stage without running the appropriate entire nebula task, you have to configure extend the project object with the release.stage variable, containing the stage you want to apply. Like so:

allprojects {
    project.ext.set("release.stage", "SNAPSHOT")
}

This will configure your project with the snapshot strategy.

> Configure project :
Evaluating root project 'deploymentHelper_test' using build file 'path/to/project/build.gradle'.
Compiling build file 'path/to/project/build.gradle' using SubsetScriptTransformer.
Skipping configuration of nebula bintray task since it is not present
Skipping configuration of bintray task since it is not present
Compiling build file 'path/to/project/build.gradle' using BuildScriptTransformer.
Using snapshot strategy because repo is dirty and stage (SNAPSHOT) is one of: [SNAPSHOT]
Beginning version inference using snapshot strategy and input scope (null) and stage (SNAPSHOT)
Inferred project: yourAwesomeProject, version: 2.5.0-SNAPSHOT
All projects evaluated.

I know, that this is not really what the plugin is about. But if you want to run it in a CI/CD chain you want to separate the stages, and this way you can easily do this.

VincentSch4rf avatar May 08 '19 09:05 VincentSch4rf