Skip to content
Snippets Groups Projects
  1. Apr 28, 2010
    • Ryan Jackson's avatar
      Add script to find current HEAD for build · 231b5953
      Ryan Jackson authored
      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.
      231b5953
Loading