-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add means to check if version is a snapshot programatically. #749
base: main
Are you sure you want to change the base?
Conversation
…edVersion Introduces a method, getDecoratedVersion() in the VersionConfig class, allowing you to easily retrieve the cached decorated version, instead of having to do versionProvider().get(), which looks less nice (imo) Also introduces a method, isSnapshot() to DecoratedVersion, which allows you to check if the decorated version is a snapshot. This is passed the value of VersionContact.isSnapshot(). This is convenient for checking if a version is a snapshot or not when building the project.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #749 +/- ##
============================================
- Coverage 63.74% 63.69% -0.06%
Complexity 442 442
============================================
Files 82 82
Lines 1633 1636 +3
Branches 161 161
============================================
+ Hits 1041 1042 +1
- Misses 523 525 +2
Partials 69 69 ☔ View full report in Codecov by Sentry. |
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 |
Exposes cached
DecoratedVersion
, and introduce isSnapshot() toDecoratedVersion
.Fixes #678.
getDecoratedVersion()
in theVersionConfig
class, 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 dodecoratedVersion
instead ofversionProvider().get()
)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.