-
Notifications
You must be signed in to change notification settings - Fork 340
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
rez bump
command?
#931
Comments
I often use bumpversion to do this. So basically:
This also has the benefit of being able to update versions in multiple places if needed (e.g. in docs, or about boxes, resource files or the likes) |
you might consider a pre-commit hook. master=$(git show master:package.py | grep version | cut -d'"' -f 2)
current=$(git show HEAD:package.py | grep version | cut -d'"' -f 2)
if [ "$master" = "$current" ]; then
echo "version bump required"
exit 1
fi it simply compares the 2 versions and errors if master matches your current branch @instinct-vfx https://cmake.org/cmake/help/v3.2/command/configure_file.html
said file has the also for code you can get any packages version from the environment specifically |
IMO this is outside the scope of rez. Both previous suggestions (separate
bumpversion tool, pre-commit hook) sound like reasonable solutions.
Thx
A
…On Wed, Aug 12, 2020 at 11:52 PM Rob Fletcher ***@***.***> wrote:
you might consider a pre-commit hook.
master=$(git show master:package.py | grep version | cut -d'"' -f 2)
current=$(git show HEAD:package.py | grep version | cut -d'"' -f 2)
if [ "$master" = "$current" ]; then
echo "version bump required"
exit 1fi
it simply compares the 2 versions and errors if master matches your
current branch
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#931 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMOUSUFP2VKWUA7N3MMTYDSAKNBPANCNFSM4P25IQOA>
.
|
Yep agreed - thanks for the suggestions! |
I was going to write a small helper script to automate the process of releasing a new version, which for me involves:
git log
to check what commits have been made since last release (mostly to verify I haven't already bumped the version number)package.py
to, most often, just increase the minor versiongit add package.py && git commit -m "Bump version" && git push
..before running
rez release
. None of the steps are too hard on their own, but adds up to be a little tedious and accident prone (quite often I've forgotten to bump the version string as per #914)Before I write this as a standalone script, is this something that could potentially be useful as part of rez itself? I'm unsure as seems like it could be useful, but also might be a little too workflow-specific to be in core rez?
The text was updated successfully, but these errors were encountered: