3

I would like to increment the setup.py version of a python package on every merge into master (if the version was not changed within the branch). I have a script currently to bump the version. I know this is somewhat bad practice (as the bump may not be very explicit), but incrementing the version every time a change is made and merged has become very cumbersome and caused multiple problems due to critical packages not being updated. So, ignoring those concerns, is there a way to configure GitHub do this or something similar on merge? Is there any type of merge hook to run events, and can these hooks update the repository?

That question aside, if there are any better ways of handling this problem, I would love to hear alternative ideas.

1 Answers1

1

Check this post-merge hook but since you want it to be updated before the merge happens, you can use pre-commit hook for this and then check if a merge is happening

Marlon Abeykoon
  • 11,927
  • 4
  • 54
  • 75