mockito / shipkit

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

Clean build output for regular builds #664

Closed mockitoguy closed 6 years ago

mockitoguy commented 6 years ago

Problem

Currently, the build produces a confusing "BUILD FAILED" message for ordinary builds that skip release (full log):

[assertReleaseNeeded] :assertReleaseNeeded FAILED
[assertReleaseNeeded] 
[assertReleaseNeeded] FAILURE: Build failed with an exception.
[assertReleaseNeeded] 
[assertReleaseNeeded] * What went wrong:
[assertReleaseNeeded] Execution failed for task ':assertReleaseNeeded'.
[assertReleaseNeeded] >  Skipping release because publications are identical.
[assertReleaseNeeded] 
[assertReleaseNeeded] * Try:
[assertReleaseNeeded] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[assertReleaseNeeded] 
[assertReleaseNeeded] BUILD FAILED in 8s
[assertReleaseNeeded] 6 actionable tasks: 4 executed, 2 up-to-date
[assertReleaseNeeded] 

When the build works on, the log file should not contain messages such as "BUILD FAILED".

Solution

Currently, ciPerformRelease task executes assertReleaseNeeded and stops further execution if the latter fails. Let's change is so that instead of using build failure as signal, we use a marker file as signal. Let's make the releaseNeeded task produce a marker file like "build/release-needed-marker.txt". Then, ciPerformRelease task would stop execution when the marker file is absent.

Marker file needs to be deleted first thing that releaseNeeded does.

Getting started

Implementing this feature would make the build logs much cleaner!!!

epeee commented 6 years ago

Closing since this one is implemented now in v2.0.23.