-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Unable to run changelog method in script plugins.
If the code below put in build.gradle then it will work, but if won't on script plugin.
I can't reload with --stacktrace arguments. So here is the other option I have
Code:
private String parseChangelog() {
if (propertyBool('publish_with_changelog')) {
if (!file('CHANGELOG.md').exists()) {
throw new GradleException('publish_with_changelog is true, but CHANGELOG.md does not exist in the workspace!')
}
String parsedChangelog =
changelog.renderItem(
changelog.getLatest().withHeader(false).withEmptySections(false),
Changelog.OutputType.MARKDOWN)
if (parsedChangelog.isEmpty()) {
throw new GradleException('publish_with_changelog is true, but the changelog for the latest version is empty!')
}
return parsedChangelog
}
return null
}
To Reproduce
Reload project.
Expected behavior
Changelog should be printed.
Environment:
- OS: Window
- Gradle Changelog Plugin Version: 2.2.0
- Gradle Version: 8.3
Additional context
No infos.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working