-
Notifications
You must be signed in to change notification settings - Fork 24
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
Create shell script to run to automatically bump the version number in setup.cfg and setup.py #56
Comments
Hi! So I got to working a little bit on this issue. So far I've covered some good ground but I'm still not sure of how the versioning system works. From what I've read online, I can see that different projects use different versioning systems. What I have so far is a script that reads the current version number from setup.cfg. If the last number is 10, eg. 1.4.10, it'll bump up the number and make it 1.5.0. For any other third number less than 10, eg. 1.4.3, it'll simply bump up the last number and make it 1.4.4. I was just looking for some guidance on how to proceed with how you're looking for the version number to get bumped up. Thanks! EDIT: I'm taking a look at the versioning semantic right now. Missed it before but I should be able to do this if that's okay! |
Hello @AliShahpurwala thank you for taking the time of your day to contribute to ozone! ideally you can make the script take in a single option with one of these values {minor, major,patch} and the script will simply increment this specific number in various places inside the python packaging files that @Milind220 listed above |
@AliShahpurwala I have assigned you to handle this issue 😁 |
@AliShahpurwala Hey! @Sam-damn explained it well. As he mentions, the script doesn't need to decide the new version number on its own, but instead accept the version number from whoever runs it. Then it just does the job of changing it for us Hope that clears it up! |
Hey guys! Thank you so much for the input. I've created a small shell script to do so. I'll explain the usage in the PR request. I've done some limited testing (General and boundary cases) and so far it seems to working as intended. |
Hey @AliShahpurwala, on testing the script now, I've been unable to get it to work. I realise now that this could be because my computer uses Zsh as it's default shell, but I'm not entirely sure. Here's what I've tried (Below each code segment is the output that it showed me):
sh updateVersion.sh patch zsh updateVersion.sh patch
bash updateVersion.sh patch zsh updateVersion.sh
bash updateVersion.sh
sh updateVersion.sh |
Hmm ok that's odd. I'll take a look at this and get back to you ASAP. I'll also try and see the OS that I'm working on currently and try it on a VM too if required. EDIT 1: Ok so I fetched and merged all the new commits that I needed and pulled them to my repo. When I tried using my script then, it wouldn't run and give me a whole bunch of weird errors. But then I deleted my repo from my local PC and cloned it again. Once I did that, the script seems to be working properly as intended. This is really weird but I'm going to keep working at it and keep you updated. If anyone else has any input to this problem, feel free to jump in! EDIT 2: Here is something I found that would explain why zsh breaks. I was able to recreate the second set of errors that you got (ie. bad option -a). The script doesn't seem to work with zsh. Final EDIT: Ok so I've now tested the script on my local Windows PC through the Ubuntu WSL as well as a Linux Mint VM. The reason that this issue is coming up is because some of the functions that are used are all configured for bash. So for the script to work, you can't use either zsh or sh. It must be run with bash. So the usage will be
|
@AliShahpurwala Gotcha! That makes sense. I'll try re-cloning the repo and then try it with bash. Thanks! |
Hey so from this issue, I had an idea that would help maybe avoid these problems in the future. I've recently been using Docker in one of my courses for school and it seems that if we have a Docker image that people could use, it could help avoid some development problems in the future. I'm still very very new to Docker but I'm willing to learn more about it and give it a go. Not sure if this is overkill but I feel like it could do some good. Let me know what you think ! |
@AliShahpurwala Hey! Docker might be a tad overkill for something like Ozone as far as I understand. However, as you learn more about it, if you see a good concrete application for it I'd be open to using it with the package. |
This script would be run by the maintainer when a new release is being created, to bump the version number before the final commit for the release.
The text was updated successfully, but these errors were encountered: