Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
normalizes setScope(string) to be case unsensitive (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joaquimmnetto authored Jan 15, 2024
1 parent 5925b36 commit 4af1c91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class VersionPluginMultiProjectIntegrationSpec extends VersionIntegrationSpec {
${applyPlugin(VersionPlugin)}
versionBuilder.prefix = ${wrapValueBasedOnType(it.prefix, String)}
versionBuilder.stage.set(${wrapValueBasedOnType(it.stage, String)})
versionBuilder.scope = provider{ ${wrapValueBasedOnType(it.scope, "ChangeScope")} }
versionBuilder.scope = ${wrapValueBasedOnType(it.scope, String)}
versionBuilder.versionScheme = ${wrapValueBasedOnType(it.versionScheme, String)}
versionBuilder.versionCodeScheme = ${wrapValueBasedOnType(it.versionCodeScheme, String)}
Expand Down Expand Up @@ -87,7 +87,7 @@ class VersionPluginMultiProjectIntegrationSpec extends VersionIntegrationSpec {
prefix: "proj1-",
nearestNormal: "0.0.1",
stage: "final",
scope: ChangeScope.MINOR,
scope: "MINOR",
versionScheme: "semver",
versionCodeScheme: VersionCodeSchemes.releaseCountBasic,
newVersion: "0.1.0",
Expand All @@ -99,7 +99,7 @@ class VersionPluginMultiProjectIntegrationSpec extends VersionIntegrationSpec {
prefix: "proj2-",
nearestNormal: "1.0.0",
stage: "rc",
scope: ChangeScope.MAJOR,
scope: 'major',
versionScheme: "semver2",
versionCodeScheme: VersionCodeSchemes.semver,
newVersion: "2.0.0-rc.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ trait VersionPluginExtension implements BaseSpec {
}

void setScope(String scope) {
this.scope.set(ChangeScope.valueOf(scope.trim()))
this.scope.set(ChangeScope.valueOf(scope.trim().toUpperCase()))
}

private final Property<String> prefix = objects.property(String)
Expand Down

0 comments on commit 4af1c91

Please sign in to comment.