Skip to content

Commit

Permalink
project.version set when updateProjectVersionAfterRelease flag is ena…
Browse files Browse the repository at this point in the history
…bled | fixes #806
  • Loading branch information
bgalek committed Sep 3, 2024
1 parent 9ef9fc7 commit 39f17d0
Show file tree
Hide file tree
Showing 13 changed files with 248 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,20 @@ class BaseIntegrationTest extends RepositoryBasedTest {

BuildResult runGradle(String... arguments) {
def args = []
args.addAll(arguments)
args.add("--stacktrace")
args.add("--configuration-cache")
args.add("--warning-mode=fail")
args.addAll(arguments)
runGradleWithoutConfigurationCache(args)
}

BuildResult runGradleWithoutConfigurationCache(List<String> args) {
try {
return gradle().withArguments(args).build()
}
catch (e) {
throw new RuntimeException("Gradle build failed", e)
}

finally {
def ccDir = new File(temporaryFolder, "build/reports/configuration-cache")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,79 @@ class SimpleIntegrationTest extends BaseIntegrationTest {
cleanup:
environmentVariablesRule.clear("GITHUB_ACTIONS", "GITHUB_OUTPUT")
}
def "should not update project.version after release when updateProjectVersionAfterRelease option is not set"() {
given:
buildFile("""
task assemble {
inputs.property("version", project.version)
doLast {
println("Assembling project: " + version)
}
}
""")
def result = runGradleWithoutConfigurationCache(
['currentVersion', 'release', 'assemble', '-Prelease.localOnly', '-Prelease.disableChecks']
)
expect:
result.output.contains('Project version: 0.1.0-SNAPSHOT')
result.output.contains('Creating tag: v0.1.0')
result.output.contains('Assembling project: 0.1.0-SNAPSHOT')
result.task(":currentVersion").outcome == TaskOutcome.SUCCESS
result.task(":release").outcome == TaskOutcome.SUCCESS
result.task(":assemble").outcome == TaskOutcome.SUCCESS
}
def "should update project.version after release when updateProjectVersionAfterRelease option is set"() {
given:
buildFile("""
scmVersion {
updateProjectVersionAfterRelease = true
}

task assemble {
inputs.property("version", project.version)
doLast {
println("Assembling project: " + version)
}
}
""")
def result = runGradleWithoutConfigurationCache(
['currentVersion', 'release', 'assemble', '-Prelease.localOnly', '-Prelease.disableChecks']
)
expect:
result.output.contains('Project version: 0.1.0-SNAPSHOT')
result.output.contains('Creating tag: v0.1.0')
result.output.contains('Project version will be updated after release.')
result.output.contains('Assembling project: 0.1.0')
result.task(":currentVersion").outcome == TaskOutcome.SUCCESS
result.task(":release").outcome == TaskOutcome.SUCCESS
result.task(":assemble").outcome == TaskOutcome.SUCCESS
}
def "should not fail build when using updateProjectVersionAfterRelease and configuration cache is enabled"() {
given:
buildFile("""
scmVersion {
updateProjectVersionAfterRelease = true
}

task assemble {
inputs.property("version", project.version)
doLast {
println("Assembling project: " + version)
}
}
""")
when:
def result = runGradle('release', '--stacktrace', '-Prelease.localOnly', '-Prelease.disableChecks')
then:
result.task(":release").outcome == TaskOutcome.SUCCESS
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package pl.allegro.tech.build.axion.release

class ConfigurationCacheConfiguration {
boolean updateProjectVersionAfterRelease
boolean configurationCacheEnabled
public Closure<String> updateProjectVersion

ConfigurationCacheConfiguration(boolean updateProjectVersionAfterRelease, Closure<String> updateProjectVersion) {
this.updateProjectVersionAfterRelease = updateProjectVersionAfterRelease
this.updateProjectVersion = updateProjectVersion
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package pl.allegro.tech.build.axion.release


import org.gradle.api.tasks.TaskAction
import pl.allegro.tech.build.axion.release.domain.Releaser
import pl.allegro.tech.build.axion.release.domain.scm.ScmService
import pl.allegro.tech.build.axion.release.infrastructure.di.VersionResolutionContext

abstract class CreateReleaseTask extends BaseAxionTask {
Expand All @@ -10,11 +12,16 @@ abstract class CreateReleaseTask extends BaseAxionTask {
void release() {
VersionResolutionContext context = resolutionContext()
Releaser releaser = context.releaser()
ScmService scmService = context.scmService()

Check warning on line 15 in src/main/groovy/pl/allegro/tech/build/axion/release/CreateReleaseTask.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/CreateReleaseTask.groovy#L15

Added line #L15 was not covered by tests
ReleaseBranchesConfiguration releaseBranchesConfiguration = new ReleaseBranchesConfiguration(
context.scmService().isReleaseOnlyOnReleaseBranches(),
scmService.isReleaseOnlyOnReleaseBranches(),

Check warning on line 17 in src/main/groovy/pl/allegro/tech/build/axion/release/CreateReleaseTask.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/CreateReleaseTask.groovy#L17

Added line #L17 was not covered by tests
context.repository().currentPosition().getBranch(),
context.scmService().getReleaseBranchNames()
scmService.getReleaseBranchNames()

Check warning on line 19 in src/main/groovy/pl/allegro/tech/build/axion/release/CreateReleaseTask.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/CreateReleaseTask.groovy#L19

Added line #L19 was not covered by tests
)
ConfigurationCacheConfiguration configurationCacheConfiguration = new ConfigurationCacheConfiguration(
scmService.isUpdateProjectVersionAfterRelease(),
(version) -> project.setVersion(version)

Check warning on line 23 in src/main/groovy/pl/allegro/tech/build/axion/release/CreateReleaseTask.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/CreateReleaseTask.groovy#L21-L23

Added lines #L21 - L23 were not covered by tests
)
releaser.release(context.rules(), releaseBranchesConfiguration)
releaser.release(context.rules(), releaseBranchesConfiguration, configurationCacheConfiguration)

Check warning on line 25 in src/main/groovy/pl/allegro/tech/build/axion/release/CreateReleaseTask.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/CreateReleaseTask.groovy#L25

Added line #L25 was not covered by tests
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package pl.allegro.tech.build.axion.release


import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.util.GradleVersion
import pl.allegro.tech.build.axion.release.domain.SnapshotDependenciesChecker
import pl.allegro.tech.build.axion.release.domain.VersionConfig
import pl.allegro.tech.build.axion.release.util.FileLoader
Expand All @@ -27,9 +29,9 @@ abstract class ReleasePlugin implements Plugin<Project> {
})

project.tasks.register(VERIFY_RELEASE_TASK, VerifyReleaseTask) {
group = 'Release'
description = 'Verifies code is ready for release.'
snapshotDependencies.addAll(
it.group = 'Release'
it.description = 'Verifies code is ready for release.'
it.snapshotDependencies.addAll(

Check warning on line 34 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy#L32-L34

Added lines #L32 - L34 were not covered by tests
project.provider({
SnapshotDependenciesChecker checker = new SnapshotDependenciesChecker();
return checker.snapshotVersions(project)
Expand All @@ -38,15 +40,41 @@ abstract class ReleasePlugin implements Plugin<Project> {
}

project.tasks.register(RELEASE_TASK, ReleaseTask) {
group = 'Release'
description = 'Performs release - creates tag and pushes it to remote.'
dependsOn(VERIFY_RELEASE_TASK)
it.group = 'Release'
it.description = 'Performs release - creates tag and pushes it to remote.'
it.dependsOn(VERIFY_RELEASE_TASK)

Check warning on line 45 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy#L43-L45

Added lines #L43 - L45 were not covered by tests
if (GradleVersion.current() >= GradleVersion.version("7.4")) {
it.notCompatibleWithConfigurationCache(
"Configuration cache is enabled and `scmVersion.updateProjectVersionAfterRelease` " +

Check warning on line 48 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy#L47-L48

Added lines #L47 - L48 were not covered by tests
"is set to `true`. This is not supported. Set `scmVersion.updateProjectVersionAfterRelease` to `false` " +
"and remember to run release task separately."
)
}
if (versionConfig.updateProjectVersionAfterRelease.get() && !project.tasks.matching { it.name == "assemble" }.isEmpty()) {
it.doLast {
logger.quiet("Project version will be updated after release.")

Check warning on line 55 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy#L54-L55

Added lines #L54 - L55 were not covered by tests
}
it.finalizedBy(project.tasks.named("assemble"))
}

Check warning on line 58 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy#L57-L58

Added lines #L57 - L58 were not covered by tests
}

project.tasks.register(CREATE_RELEASE_TASK, CreateReleaseTask) {
group = 'Release'
description = 'Performs first stage of release - creates tag.'
dependsOn(VERIFY_RELEASE_TASK)
it.group = 'Release'
it.description = 'Performs first stage of release - creates tag.'
it.dependsOn(VERIFY_RELEASE_TASK)

Check warning on line 64 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy#L62-L64

Added lines #L62 - L64 were not covered by tests
if (GradleVersion.current() >= GradleVersion.version("7.4")) {
it.notCompatibleWithConfigurationCache(
"Configuration cache is enabled and `scmVersion.updateProjectVersionAfterRelease` " +

Check warning on line 67 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy#L66-L67

Added lines #L66 - L67 were not covered by tests
"is set to `true`. This is not supported. Set `scmVersion.updateProjectVersionAfterRelease` to `false` " +
"and remember to run release task separately."
)
}
if (versionConfig.updateProjectVersionAfterRelease.get() && !project.tasks.matching { it.name == "assemble" }.isEmpty()) {
it.doLast {
logger.quiet("Project version will be updated after release.")

Check warning on line 74 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy#L73-L74

Added lines #L73 - L74 were not covered by tests
}
it.finalizedBy(project.tasks.named("assemble"))
}

Check warning on line 77 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleasePlugin.groovy#L76-L77

Added lines #L76 - L77 were not covered by tests
}

project.tasks.register(PUSH_RELEASE_TASK, PushReleaseTask) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package pl.allegro.tech.build.axion.release


import org.gradle.api.tasks.TaskAction
import pl.allegro.tech.build.axion.release.domain.Releaser
import pl.allegro.tech.build.axion.release.domain.scm.ScmPushResult
import pl.allegro.tech.build.axion.release.domain.scm.ScmPushResultOutcome
import pl.allegro.tech.build.axion.release.domain.scm.ScmService
import pl.allegro.tech.build.axion.release.infrastructure.di.VersionResolutionContext

import java.nio.file.Files
Expand All @@ -16,13 +18,24 @@ abstract class ReleaseTask extends BaseAxionTask {
void release() {
VersionResolutionContext context = resolutionContext()
Releaser releaser = context.releaser()
ScmService service = context.scmService()

Check warning on line 21 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleaseTask.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleaseTask.groovy#L21

Added line #L21 was not covered by tests

ReleaseBranchesConfiguration releaseBranchesConfiguration = new ReleaseBranchesConfiguration(
context.scmService().isReleaseOnlyOnReleaseBranches(),
service.isReleaseOnlyOnReleaseBranches(),

Check warning on line 24 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleaseTask.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleaseTask.groovy#L24

Added line #L24 was not covered by tests
context.repository().currentPosition().getBranch(),
context.scmService().getReleaseBranchNames()
service.getReleaseBranchNames()

Check warning on line 26 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleaseTask.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleaseTask.groovy#L26

Added line #L26 was not covered by tests
)

ScmPushResult result = releaser.releaseAndPush(context.rules(), releaseBranchesConfiguration)
ConfigurationCacheConfiguration configurationCacheConfiguration = new ConfigurationCacheConfiguration(
service.isUpdateProjectVersionAfterRelease(),
(version) -> project.setVersion(version)

Check warning on line 31 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleaseTask.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleaseTask.groovy#L29-L31

Added lines #L29 - L31 were not covered by tests
)

ScmPushResult result = releaser.releaseAndPush(
context.rules(),

Check warning on line 35 in src/main/groovy/pl/allegro/tech/build/axion/release/ReleaseTask.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/ReleaseTask.groovy#L34-L35

Added lines #L34 - L35 were not covered by tests
releaseBranchesConfiguration,
configurationCacheConfiguration
)

if (result.outcome === ScmPushResultOutcome.FAILED) {
def status = result.failureStatus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ abstract class VersionConfig extends BaseExtension {
private static final String IGNORE_UNCOMMITTED_CHANGES_PROPERTY = 'release.ignoreUncommittedChanges'
private static final String FORCE_SNAPSHOT_PROPERTY = 'release.forceSnapshot'
private static final String USE_HIGHEST_VERSION_PROPERTY = 'release.useHighestVersion'
private static final String UPDATE_PROJECT_VERSION_AFTER_RELEASE_PROPERTY = 'release.updateProjectVersionAfterRelease'
private static final String LOCAL_ONLY = "release.localOnly"
private static final String FORCE_VERSION_PROPERTY = 'release.version'
private static final String DEPRECATED_FORCE_VERSION_PROPERTY = 'release.forceVersion'
Expand All @@ -43,6 +44,7 @@ abstract class VersionConfig extends BaseExtension {
getLocalOnly().convention(false)
getIgnoreUncommittedChanges().convention(true)
getUseHighestVersion().convention(false)
getUpdateProjectVersionAfterRelease().convention(false)
getUnshallowRepoOnCI().convention(false)
getIgnoreGlobalGitConfig().convention(false)
getReleaseBranchNames().convention(gradlePropertyAsSet(RELEASE_BRANCH_NAMES_PROPERTY).orElse(['master', 'main'] as Set))
Expand Down Expand Up @@ -127,6 +129,9 @@ abstract class VersionConfig extends BaseExtension {
@Internal
abstract Property<Boolean> getUseHighestVersion();

@Internal
abstract Property<Boolean> getUpdateProjectVersionAfterRelease();

Provider<Boolean> ignoreUncommittedChanges() {
gradlePropertyPresent(IGNORE_UNCOMMITTED_CHANGES_PROPERTY)
.orElse(ignoreUncommittedChanges)
Expand All @@ -140,6 +145,10 @@ abstract class VersionConfig extends BaseExtension {
gradlePropertyPresent(USE_HIGHEST_VERSION_PROPERTY).orElse(useHighestVersion)
}

Provider<Boolean> updateProjectVersionAfterRelease() {
gradlePropertyPresent(UPDATE_PROJECT_VERSION_AFTER_RELEASE_PROPERTY).orElse(updateProjectVersionAfterRelease)

Check warning on line 149 in src/main/groovy/pl/allegro/tech/build/axion/release/domain/VersionConfig.groovy

View check run for this annotation

Codecov / codecov/patch

src/main/groovy/pl/allegro/tech/build/axion/release/domain/VersionConfig.groovy#L149

Added line #L149 was not covered by tests
}

Provider<Boolean> localOnly() {
gradlePropertyPresent(LOCAL_ONLY).orElse(localOnly)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class ScmPropertiesFactory {
config.getUnshallowRepoOnCI().get(),
config.getReleaseBranchNames().get(),
config.getReleaseOnlyOnReleaseBranches().get(),
config.getIgnoreGlobalGitConfig().get()
config.getIgnoreGlobalGitConfig().get(),
config.getUpdateProjectVersionAfterRelease().get(),
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.github.zafarkhaja.semver.Version;
import org.gradle.api.logging.Logger;
import org.gradle.api.logging.Logging;
import pl.allegro.tech.build.axion.release.ConfigurationCacheConfiguration;
import pl.allegro.tech.build.axion.release.ReleaseBranchesConfiguration;
import pl.allegro.tech.build.axion.release.domain.hooks.ReleaseHooksRunner;
import pl.allegro.tech.build.axion.release.domain.properties.Properties;
Expand All @@ -25,7 +26,11 @@ public Releaser(VersionService versionService, ScmService repository, ReleaseHoo
this.hooksRunner = hooksRunner;
}

public Optional<String> release(Properties properties, ReleaseBranchesConfiguration releaseBranchesConfiguration) {
public Optional<String> release(
Properties properties,
ReleaseBranchesConfiguration releaseBranchesConfiguration,
ConfigurationCacheConfiguration configurationCacheConfiguration
) {
if (releaseBranchesConfiguration.shouldRelease()) {
String message = String.format(
"Release step skipped since 'releaseOnlyOnReleaseBranches' option is set, and '%s' was not in 'releaseBranchNames' list [%s]",
Expand All @@ -42,6 +47,14 @@ public Optional<String> release(Properties properties, ReleaseBranchesConfigurat

Version version = versionContext.getVersion();

if (configurationCacheConfiguration.isUpdateProjectVersionAfterRelease()) {
if (configurationCacheConfiguration.isConfigurationCacheEnabled()) {
throw new IllegalStateException("Configuration cache is enabled and `scmVersion.updateProjectVersionAfterRelease` is set to `true`. " +

Check warning on line 52 in src/main/java/pl/allegro/tech/build/axion/release/domain/Releaser.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/pl/allegro/tech/build/axion/release/domain/Releaser.java#L52

Added line #L52 was not covered by tests
"This is not supported. Set `scmVersion.updateProjectVersionAfterRelease` to `false` and remember to run release task separately.");
}
configurationCacheConfiguration.updateProjectVersion.call(version.toString());

Check warning on line 55 in src/main/java/pl/allegro/tech/build/axion/release/domain/Releaser.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/pl/allegro/tech/build/axion/release/domain/Releaser.java#L55

Added line #L55 was not covered by tests
}

if (versionContext.isSnapshot()) {
String tagName = properties.getTag().getSerialize().apply(properties.getTag(), version.toString());

Expand All @@ -58,8 +71,12 @@ public Optional<String> release(Properties properties, ReleaseBranchesConfigurat
}
}

public ScmPushResult releaseAndPush(Properties rules, ReleaseBranchesConfiguration releaseBranchesConfiguration) {
Optional<String> releasedTagName = release(rules, releaseBranchesConfiguration);
public ScmPushResult releaseAndPush(
Properties rules,
ReleaseBranchesConfiguration releaseBranchesConfiguration,
ConfigurationCacheConfiguration configurationCacheEnabled
) {
Optional<String> releasedTagName = release(rules, releaseBranchesConfiguration, configurationCacheEnabled);

Check warning on line 79 in src/main/java/pl/allegro/tech/build/axion/release/domain/Releaser.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/pl/allegro/tech/build/axion/release/domain/Releaser.java#L79

Added line #L79 was not covered by tests

if (releasedTagName.isEmpty()) {
return new ScmPushResult(ScmPushResultOutcome.SKIPPED, Optional.empty(), Optional.empty());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class ScmProperties {
private final Set<String> releaseBranchNames;
private final boolean releaseOnlyOnReleaseBranches;
private final boolean ignoreGlobalGitConfig;
private final boolean updateProjectVersionAfterRelease;

public ScmProperties(
String type,
Expand All @@ -35,7 +36,8 @@ public ScmProperties(
Boolean unshallowRepoOnCI,
Set<String> releaseBranchNames,
boolean releaseOnlyOnReleaseBranches,
boolean ignoreGlobalGitConfig
boolean ignoreGlobalGitConfig,
boolean updateProjectVersionAfterRelease
) {
this.type = type;
this.directory = directory;
Expand All @@ -51,6 +53,7 @@ public ScmProperties(
this.releaseBranchNames = releaseBranchNames;
this.releaseOnlyOnReleaseBranches = releaseOnlyOnReleaseBranches;
this.ignoreGlobalGitConfig = ignoreGlobalGitConfig;
this.updateProjectVersionAfterRelease = updateProjectVersionAfterRelease;
}

public ScmPushOptions pushOptions() {
Expand Down Expand Up @@ -112,4 +115,8 @@ public boolean isReleaseOnlyOnReleaseBranches() {
public boolean isIgnoreGlobalGitConfig() {
return ignoreGlobalGitConfig;
}

public boolean isUpdateProjectVersionAfterRelease() {
return updateProjectVersionAfterRelease;

Check warning on line 120 in src/main/java/pl/allegro/tech/build/axion/release/domain/scm/ScmProperties.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/pl/allegro/tech/build/axion/release/domain/scm/ScmProperties.java#L120

Added line #L120 was not covered by tests
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,8 @@ public Set<String> getReleaseBranchNames() {
public boolean isReleaseOnlyOnReleaseBranches(){
return scmProperties.isReleaseOnlyOnReleaseBranches();
}

public boolean isUpdateProjectVersionAfterRelease() {
return scmProperties.isUpdateProjectVersionAfterRelease();

Check warning on line 83 in src/main/java/pl/allegro/tech/build/axion/release/domain/scm/ScmService.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/pl/allegro/tech/build/axion/release/domain/scm/ScmService.java#L83

Added line #L83 was not covered by tests
}
}
Loading

0 comments on commit 39f17d0

Please sign in to comment.