Skip to content

Commit

Permalink
add snapshot version check for plugins and profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconsole committed Oct 18, 2024
1 parent 204195f commit f76cf5a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions grails-bom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,15 @@ publishing {
def propsNode = root.appendNode('properties')

plugins.each { key, version ->
if (!isBuildSnapshot && version.endsWith("-SNAPSHOT")) {
throw new RuntimeException("Cannot have a snapshot dependency $version on a plugin [$key] for a release!")
}
propsNode.appendNode("${key}.version", version)
}
profiles.each { key, version ->
if (!isBuildSnapshot && version.endsWith("-SNAPSHOT")) {
throw new RuntimeException("Cannot have a snapshot dependency $version on a plugin [$key] for a release!")
}
propsNode.appendNode("${key}.version", version)
}
}
Expand Down

0 comments on commit f76cf5a

Please sign in to comment.