openlilylib / snippets

A place to store useful pieces of LilyPond code - custom functions, engravers, hacks, templates, examples etc.
Other
119 stars 39 forks source link

git-commands: \gitTag command and update version statements #143

Closed gregrs-uk closed 8 years ago

gregrs-uk commented 8 years ago

Add \gitTag command and example. Update version statements for git-commands to 2.18.2

\gitTag prints the most reachable tag. If there have been commits since, a number will be appended to the tag. If there is no tag, it falls back to printing the short commitish.

I have used this previously to keep track of different 'released' versions of the score for a musical whilst things changed during rehearsals. When I wanted to print a new set of scores/parts, I would create a tag named with the date e.g. 2015-12-21, which would be displayed in the header of each page.

If you want to go back to a previous released version, you can just run git checkout 2015-12-01, for example, and compile. (I used a Makefile.) For a list of released versions, you can run git tag.