Skip to content

Commit 88f2c16

Browse files
authored
Merge pull request #13 from diffplug/feat/main-is-main
Change main branch to 'main'
2 parents c7ce825 + 7f9c113 commit 88f2c16

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- **BREAKING** Default branch is now assumed to be `main` rather than `master`. ([#13](https://github.com/diffplug/spotless-changelog/pull/13))
810
### Fixed
911
- Better error message for cases where the `spotlessChangelog` block is too low. ([#6](https://github.com/diffplug/spotless-changelog/issues/6))
1012
- Bug in `PoolString.concat(String)` ([1f6da65](https://github.com/diffplug/spotless-changelog/commit/1f6da65b51c5ee7af847dc0e427fe685fbd3d43c)).

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ We also support other version schemas, like `2.0` instead of `2.0.0`, or `brand.
107107

108108
The terrible thing about `0.x` is that *the more unstable a codebase is, the more valuable **(concise compatibility guarantee).(new feature advertisement).(lowest downside risk to upgrade)** would be!*
109109

110-
But habits are what they are, and you're going to keep publishing things with `0.x`. I will judge you for that, but Spotless Changelog won't. It will just increment the `added` version (`0.1.0`, `0.2.0`, `0.3.0`, etc) whether your changelog has `**BREAKING**` or just `### Added`. See how the information is getting lost? If you really want to stick with `0.x`, you can convey a lot more information with [`0.breaking.added.fixed`](https://github.com/diffplug/spotless-changelog/blob/master/ALTERNATE_VERSION_SCHEMAS.md#available-schemas).
110+
But habits are what they are, and you're going to keep publishing things with `0.x`. I will judge you for that, but Spotless Changelog won't. It will just increment the `added` version (`0.1.0`, `0.2.0`, `0.3.0`, etc) whether your changelog has `**BREAKING**` or just `### Added`. See how the information is getting lost? If you really want to stick with `0.x`, you can convey a lot more information with [`0.breaking.added.fixed`](https://github.com/diffplug/spotless-changelog/blob/main/ALTERNATE_VERSION_SCHEMAS.md#available-schemas).
111111

112112
### Alphas, betas, release-candidates, etc.
113113

@@ -128,11 +128,11 @@ spotlessChangelog { // defaults
128128
tagPrefix 'release/'
129129
commitMessage 'Published release/{{version}}' // {{version}} will be replaced
130130
remote 'origin'
131-
branch 'master'
131+
branch 'main'
132132
}
133133
```
134134

135-
We recommend that you use `changelogPush` as your deploy task, and wire your tasks so that it will only happen if the publish was successful. Here is a [battle-tested wiring plan](https://github.com/diffplug/blowdryer-diffplug/blob/master/src/main/resources/base/changelog.gradle) which can even [update your README.md with the latest version number](https://github.com/diffplug/blowdryer-diffplug/blob/2.0.0/src/main/resources/spotless/freshmark.gradle#L35-L61). A simpler scheme is presented below:
135+
We recommend that you use `changelogPush` as your deploy task, and wire your tasks so that it will only happen if the publish was successful. Here is a [battle-tested wiring plan](https://github.com/diffplug/blowdryer-diffplug/blob/main/src/main/resources/base/changelog.gradle) which can even [update your README.md with the latest version number](https://github.com/diffplug/blowdryer-diffplug/blob/2.0.0/src/main/resources/spotless/freshmark.gradle#L35-L61). A simpler scheme is presented below:
136136

137137
### Multiple changelogs per project
138138

@@ -172,7 +172,7 @@ spotlessChangelog { // all defaults
172172
tagPrefix 'release/'
173173
commitMessage 'Published release/{version}' // {version} will be replaced
174174
remote 'origin'
175-
branch 'master'
175+
branch 'main'
176176
}
177177
178178
// last version parsed from changelog

spotless-changelog-lib/src/main/java/com/diffplug/spotless/changelog/GitCfg.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class GitCfg {
2828
/** Message used for release commits, default is `Published release/{{version}}`. */
2929
public String commitMessage = "Published release/" + COMMIT_MESSAGE_VERSION;
3030
public String remote = "origin";
31-
public String branch = "master";
31+
public String branch = "main";
3232

3333
/** Returns an api configured with this config. */
3434
public GitActions withChangelog(File changelogFile, ChangelogAndNext model) throws IOException {

spotless-changelog-plugin-gradle/src/main/java/com/diffplug/spotless/changelog/gradle/ChangelogExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void enforceCheck(boolean enforceCheck) {
112112
/**
113113
* Sets a custom {@link NextVersionFunction} by calling the public no-arg constructor of the given class.
114114
* Default value is {@link com.diffplug.spotless.changelog.NextVersionFunction.Semver Semver}.
115-
* See [ALTERNATE_VERSION_SCHEMAS.md](https://github.com/diffplug/spotless-changelog/blob/master/ALTERNATE_VERSION_SCHEMAS.md) for more info.
115+
* See [ALTERNATE_VERSION_SCHEMAS.md](https://github.com/diffplug/spotless-changelog/blob/main/ALTERNATE_VERSION_SCHEMAS.md) for more info.
116116
*/
117117
public void versionSchema(Class<? extends NextVersionFunction> functionClass) throws InstantiationException, IllegalAccessException {
118118
assertNotCalculatedYet();
@@ -188,7 +188,7 @@ public void remote(String remote) {
188188
gitCfg.remote = remote;
189189
}
190190

191-
/** Default value is 'master' */
191+
/** Default value is 'main' */
192192
public void branch(String branch) {
193193
gitCfg.branch = branch;
194194
}

0 commit comments

Comments
 (0)