Skip to content
Snippets Groups Projects
Commit 231b5953 authored by Ryan Jackson's avatar Ryan Jackson
Browse files

Add script to find current HEAD for build

Add script that, when run from the root of the repository, returns the
sha1 hash of the current branch head.  It writes the hash to stdout if
successful or returning non-zero otherwise.  The three methods used to
get the hash are as follows:

1. Try using the git tools.  This is the preferred method since the
   layout of the .git directory may change (not likely to happen soon,
   but it did change a few years ago).
2. Failing that, assume the current (1.7.x) repository layout and try
   to extract the value of HEAD.
3. If there is no .git directory, try extracting the hash from the
   VERSION file in the top-level directory of the tree.

Also add the VERSION file and set the export-subst attribute for it.
parent 32d4f3ab
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment