Created
January 17, 2011 21:46
-
-
Save KristianLyng/783542 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Author: Kristian Lyngstol <[email protected]> | |
| # | |
| # Generates RST for setting author, copyright, version. | |
| echo ":Author: Tollef Fog Heen, Kristian Lyngstøl" | |
| echo ":Copyright: Varnish Software AS 2010-2011, Redpill Linpro AS 2008-2009" | |
| VER=`git tag -l --contains | sed s/version-//` | |
| # Not a tagged commit. Should probably trigger big red letters. | |
| if [ -z $VER ]; then | |
| VER2="$(git tag -l | tail -n1)" | |
| VER="untagged draft version $(git log --format='%h' | head -n1), following ${VER2}" | |
| fi | |
| echo ":Version: $VER" | |
| echo -n ":Date: " | |
| git log --format="%ad" --date=short | head -n1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment