-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- tag convention is now configurable (previously the plugin assumed "v" prefix) - the default development branch name can be anything, "master", "main", etc. Previously, it was hardcoded to "master".
- Loading branch information
1 parent
ad8e0fc
commit 0d0faa3
Showing
9 changed files
with
88 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,14 +17,25 @@ class ChangelogPluginIntegTest extends BaseSpecification { | |
id 'org.shipkit.shipkit-changelog' | ||
} | ||
tasks.named("generateChangelog") { | ||
version = "1.2.3" | ||
tasks.named("generateChangelog") { | ||
githubToken = "secret" | ||
repository = "mockito/mockito" | ||
repository = "org/repo" | ||
date = "2022-01-01" // for reproducible assertion | ||
} | ||
""" | ||
|
||
expect: "run in dry-run mode to smoke test the configuration" | ||
runner("generateChangelog", "-m").build() | ||
when: | ||
runner("generateChangelog").build() | ||
|
||
then: | ||
//since this is an edge case (no previous versions/tags) we're ok with oversimplified output with bad links | ||
file("build/changelog.md").text == """<sup><sup>*Changelog generated by [Shipkit Changelog Gradle Plugin](https://github.com/shipkit/shipkit-changelog)*</sup></sup> | ||
#### 1.2.3 | ||
- 2022-01-01 - [0 commit(s)](https://github.com/org/repo/compare/@[email protected]) by | ||
- No notable improvements. No pull requests (issues) were referenced from commits.""" | ||
} | ||
|
||
def "complete task configuration"() { | ||
|
@@ -56,13 +67,16 @@ class ChangelogPluginIntegTest extends BaseSpecification { | |
revision = "HEAD" | ||
//The release version, default as below | ||
version = project.version | ||
version = project.version | ||
//Release tag, by default it is "v" + project.version | ||
releaseTag = "v" + project.version | ||
//Token that enables querying Github, safe to check-in because it is read-only, *no default* | ||
githubToken = "a0a4c0f41c200f7c653323014d6a72a127764e17" | ||
//Repository to look for tickets, *no default* | ||
repository = "mockito/mockito" | ||
repository = "org/repo" | ||
} | ||
""" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters