I have a project that is coming out of the alpha phase, and I am ready to start the release regularly. I know that GitHub has a โmagicโ button, but I donโt like the โmagicโ functions at all, which I donโt know exactly what they do:
https://github.com/blog/1547-release-your-software
As far as I can tell, this magic release feature on GitHub simply creates a tag in the source repository for a specific state of the code or uses an existing tag. According to this link, tag names should reflect the semantic version number, i.e. Major.Minor.Patch ex: v10.1.2 or something like that.
Typically, the accepted way for Git to do releases seems to be to just create tags. I would like to do this for Git to automatically create some kind of file in my code tree with the name of the version .txt or version.h file that contains the name of the Git tag that I created so that this file can be automatically when the user issues myporgram --version on the command line. Preferably, I would like to create an automatically generated header file, as it integrates into the binary when creating the program. Is there a way to do this automatically or do I need to automatically link the tag number in the file before I exit the git command?
git github versioning command-line-arguments version
os x nerd
source share