-
Notifications
You must be signed in to change notification settings - Fork 249
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
versions set plugin equivalent to maven #766
Comments
@arcivanov |
Yes I do. You can set version dynamically, it's all Python based so you can literally specify a version: https://pybuilder.io/documentation/manual#project-version-attribute |
If I did not understand wrong, setting via command line parameters is for one time in-memory operation and not persisted on the file right? I would like to update the build.py file with the new version |
That's fine. FYI, you don't have to submit a plugin into PyBuilder to create a plugin. You can create and host your own plugin at an arbitrary location. |
I would like just to warn you, that because "version" can be set dynamically through code, you have to implement a proper parser and evaluator to update the version attribute. And since some expressions in Python are only deterministic at runtime it may not be possible to guarantee proper code modification at all (since Python code can be deterministically only executed at runtime). That is, I would likely not accept a plugin that blindly searches for |
Yes, you are right. That is why I would like to implement into two stages as an analogy to the maven plugin, in the first stage let say "update_minor", "update_patch" or "set_version" commands to generate build.py.next after that "commit" to change to build.py to next one. |
Again. You don't need to rely on the plugin to be accepted in the core to be able to develop and publish it. I can't tell you whether I'd be willing to put it in the core until I see exactly what and how you're trying to do. 😄 If you have a prototype/mockup you'd like me to review, I'll be happy to do so. |
Hi
Maybe i missed but I could not see the availability to set the project version from the command line.
I saw -P option for setting properties but is there a way to directly update the version in the build.py
as equivalent to maven
https://www.mojohaus.org/versions-maven-plugin/set-mojo.html
The text was updated successfully, but these errors were encountered: