axion-release-plugin
axion-release-plugin copied to clipboard
Add means to check if version is a snapshot programatically.
Exposes cached DecoratedVersion, and introduce isSnapshot() to DecoratedVersion.
Fixes #678.
- Introduces a method,
getDecoratedVersion()in theVersionConfigclass, allowing you to easily retrieve the cached decorated version, instead of having to doversionProvider().get(), which looks less nice (imo) (and is especially nice in groovy/kotlin code where you'll dodecoratedVersioninstead ofversionProvider().get()) - Also introduces a method,
isSnapshot()toDecoratedVersion, which allows you to check if the decorated version is a snapshot. This is passed the value ofVersionContact.isSnapshot(). This is convenient for checking if a version is a snapshot or not when building the project.
Codecov Report
Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
Project coverage is 61.87%. Comparing base (
489aa88) to head (036727e). Report is 1 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...ch/build/axion/release/domain/VersionConfig.groovy | 0.00% | 1 Missing :warning: |
| ...ech/build/axion/release/domain/VersionService.java | 75.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #749 +/- ##
============================================
- Coverage 61.92% 61.87% -0.06%
Complexity 442 442
============================================
Files 83 83
Lines 1681 1684 +3
Branches 161 161
============================================
+ Hits 1041 1042 +1
- Misses 571 573 +2
Partials 69 69
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Do we need 100% code coverage, or no?
@bgalek (you seem to be the main person merging prs)
hi! coverage is not a target - but having a tests is ;) Please add at least one test of this feature to document the behaviour
it's mainly just exposing a couple of getters tbh, not anything very interesting, so idk how I'd go about testing that without said tests being effectively useless lol
also, could you take a peek at my other pr? because, I'm looking to get some feedback/opinions on it
@bgalek yo, unsure if you saw this or not bc it was a weekend, so I'm gonna bump it lol