Skip to content
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

Fix incrementing version number in autoconf/automake projects #79

Closed
wants to merge 3 commits into from

Conversation

alkuna
Copy link

@alkuna alkuna commented Aug 3, 2017

On development projects using GNU autoconf and automake tools, the version number should be updated in configure.ac and configure files when hot-fixing or releasing with omgf.

This patch checks for existence of configure.ac file and invokes autoreconf -f command to regenerate the configure script before adding and committing changes.

Development projects using autoconf and automake should be changed to fully advance this patch in the following sence:

  1. A configure.ac file has to read the version number from VERSION file using proper m4 macro, e.g.:
AC_INIT(project,` m4_esyscmd_s([cat VERSION]), Author <[email protected]>)
  1. autom4te.cache directory generated by autoreconf is not intended for commit, thus it should be added to .gitignore.

alkuna added 3 commits August 3, 2017 09:34
Assumes that the version number is computed (read from VERSION file) in
AC_INIT in the configure.ac file.
Also assumes that the directory autom4te.cache is added to .gitignore,
otherwise it is also added and commited.
@jnv
Copy link
Contributor

jnv commented Aug 3, 2017

Thank you Alexander! I think this would be a perfect use case for the planned hooks support, see #52. What do you think, @petrzpav?

@alkuna
Copy link
Author

alkuna commented Aug 3, 2017

Hook was exactly my first idea. It is more universal. There are other build systems like autogen.sh, cmake, etc.
I vote for hooks, it allows to specify more parameters to autoreconf according to actual project or developer needs.

@alkuna
Copy link
Author

alkuna commented Aug 3, 2017

Another hook examples related to debian packaging would be:

  1. updating debian/changelog file with calling, e.g. dch -v $(cat VERSION) "New upstream release" during version incrementing,
  2. finalizing debian/changelog with dch -r before merging to dev and master.

@petrzpav
Copy link
Member

petrzpav commented Aug 10, 2017

@jnv Yes it is very nice use-case for hooks.
@alkuna Thanks for your support and examples! Hooks will be available in the next minor version

This was referenced Aug 10, 2017
@alkuna
Copy link
Author

alkuna commented Dec 4, 2018

The pull request is no longer relevant in favor of Hooks support.

@alkuna alkuna closed this Dec 4, 2018
@alkuna alkuna deleted the dev branch December 4, 2018 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants