mockito / shipkit

Toolkit for shipping it used by Mockito library
http://shipkit.org
MIT License
158 stars 35 forks source link

Emphasize version in release notes #190

Open mockitoguy opened 7 years ago

mockitoguy commented 7 years ago

Use case

Shipkit vision is to guide software community towards continuous delivery (shipping every version to production). Mockito project does not quite fit this vision because based on community feedback, only some versions of Mockito are released to Maven Central. Shipkit is flexible enough to support this use case and it needs more work to support it even better.

This feature is marked with "please contribute!" - let us know if have any questions and if not, feel free to submit a pull request!

Emphasize version in release notes

Mockito project has custom release automation code that makes some releases go directly to Maven Central. Current Mockito release notes do show the difference between versions released to Maven Central and versions released to "mockito-development" Bintray package / repository. We manually updated the notes so that versions previously released to Maven Central stand out in the release notes. The goal of this feature is to offer some API to emphasize versions in the release notes content, so that we don't have to manually update it.

Suggested content change

Suggested change of formatting of the release header line, depending if the version is emphasized or not:


  1. Regular version:

2.8.39 - 1 commit by Szczepan Faber - 2017-05-30 - published to Bintray

  1. Emphasized version:

2.8.9 (2017-04-26) published to JCenter/Maven Central


Suggested API

project.tasks.previewReleaseNotes.emphasizeVersion = centralRelease
project.tasks.updateReleaseNotes.emphasizeVersion = centralRelease

We would configure this setting somewhere here in Mockito.

Long term plan

Long term we will try to hit the sweet balance between supporting the concept of "notable" or "emphasized" releases and keeping things simple. We did offer the concept of separate release notes file with notable releases but it has been discontinued (#157).

wwilk commented 7 years ago

In the scope of this issue how do you want to format this emphasized version? It's not a problem to make it bigger in .md file but what about these JCenter/Maven central links? Can it be Bintray for now (exactly as for a regular version) or should I add these links too?

mstachniuk commented 7 years ago

@wwilk Getting information about release to Maven Central can be tricky because separate plugin does it. I suggest to create a separate ticket for that.

mockitoguy commented 7 years ago

@wwilk Getting information about release to Maven Central can be tricky because separate plugin does it. I suggest to create a separate ticket for that.

+1, let's keep the two functionalities separate.

My initial idea on how to solve the Maven central links / different visual shield was to offer a way to template the release header information. Release header is a first line of the release note information that contains version, date, etc. How do you guys think we should solve it? We could also model this explicitly and just provide a "downloadBadge" property on the task that can be either "mavenCentral" or "bintray". Regardless, I suggest we discuss this in a separate ticket :)

mockitoguy commented 7 years ago

@wwilk, I think this is completed, right? Can we use this in Mockito project now?

wwilk commented 7 years ago

@szczepiq Emphasizing is currently done by changing the type of header in release notes. There is no Maven Central badge or different header content. But as we discussed, those should be done in separate issues.