commit d5b469fbe586b950394dae0b1b0b5791d1cb97cf
Author: Chris Roberts <cpr420@gmail.com>
Date: Fri Nov 1 22:27:00 2013 -0600
Initial attempt at remote tags for determining haiku revision
diff --git a/build/scripts/determine_haiku_revision b/build/scripts/determine_haiku_revision
index 465180a..99f1075 100755
a
|
b
|
if [ -z "$revision" -o "$lastBuiltRevision" != "$localRev" ]; then
|
30 | 30 | # the revision we use is the description of HEAD with respect to the |
31 | 31 | # last reachable hrev-(haiku-revision-)tag |
32 | 32 | revision=`git describe --dirty --tags --match=hrev*` |
| 33 | if [ -z "$revision" ];then |
| 34 | echo "Updating tag cache: $haikuBuildOutputDir/tag.cache" |
| 35 | git ls-remote -t git://git.haiku-os.org/haiku > $haikuBuildOutputDir/tag.cache |
| 36 | tag=$(grep $(git rev-parse @{u}) $haikuBuildOutputDir/tag.cache | grep hrev | cut -f3 -d/) |
| 37 | if [ -n "$tag" ];then |
| 38 | extraCommits=$(git log @{u}.. --oneline | wc -l) |
| 39 | currentHash=$(git rev-parse --short HEAD) |
| 40 | revision="$tag-$extraCommits-g$currentHash" |
| 41 | fi |
| 42 | fi |
33 | 43 | if [ -z "$revision" ]; then |
34 | 44 | # failed to find any hrev tags, use short hash instead |
35 | 45 | revision=`git rev-parse --short HEAD` |