arq5x/bedtools — pull request #19 by agordon (2012-03-09 20:07:25+00:00)
Title: Second attempt at auto-versioning

Hi Aaron,

Here's an updated Makefile rules to do auto-versioning. Hopefully they address the current issues.

With these changes:

1. When you're ready to release a new verison, run:
```make setversion VERSION=v2.16.2```
This will update a file (version_release.txt) with the version, commit this file, and git-tag the repository.
I think this will keep everything in sync, while still allow users to download a git-less zip file.
This is similar to the current "version" rule .
To push the tags back to github, you'll need:
```git push --all --tags origin```

2. when compiling, a rule called "autoversion" tries to detect the current vesrion and set "version_git.h" file.
If there is a git repository - it takes the version from there.
If there's no git repository, it takes the version from the "version_release.txt" file.
If the directory is named like "arq5x-bedtools-xxxxx", then "-zip-xxxxxx" is appended to the version string, indicating it was downloaded from github, and isn't necessarily the official release.

I tested it in several scenarios, there could be some more corner cases, but I hope it's better now.

-gordon