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
-
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-Version
to${version}
using the new //MANIFEST supportImplement an
IVersionProvider
which reads the version from the manifestReference the
versionProvider
in picocli's@Command
annotationAdd a package (otherwise the MANIFEST.MF will not be found)
You can now set the
version
at 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