internetguru / flow

Use Git Flow with ease – maintain branches, semantic versioning, releases, and changelog with a single command.
Other
41 stars 6 forks source link

Fix incrementing version number in autoconf/automake projects #79

Closed alkuna closed 5 years ago

alkuna commented 7 years ago

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 <author@email.com>)
  2. autom4te.cache directory generated by autoreconf is not intended for commit, thus it should be added to .gitignore.
jnv commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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

alkuna commented 5 years ago

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