Set picocli's version at build time using the new //MANIFEST functionality #1455
Unanswered
helpermethod
asked this question in
Show and tell
Replies: 1 comment 2 replies
-
|
Thanks for providing an example of the new feature! 👍 🙂 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
With the new //MANIFEST support, it's now very easy to set the version of a JBang picocli application at build time ❤️ !
Here are the necessary steps
Set the
Implementation-Versionto${version}using the new //MANIFEST supportImplement an
IVersionProviderwhich reads the version from the manifestReference the
versionProviderin picocli's@CommandannotationAdd a package (otherwise the MANIFEST.MF will not be found)
You can now set the
versionat build time!Works in the CI too
https://github.com/helpermethod/p2e/blob/main/.github/workflows/release.yml
Beta Was this translation helpful? Give feedback.
All reactions