Improve handling of Haiku clone without any tags.

* Error out early with a hint about how to solve the problem (by setting
  HAIKU_REVISION explicitly).
This commit is contained in:
Oliver Tappe
2014-05-31 15:35:24 +02:00
parent e1594b1775
commit d4563ace72
2 changed files with 11 additions and 3 deletions
+4 -2
View File
@@ -31,8 +31,10 @@ if [ -z "$revision" -o "$lastBuiltRevision" != "$localRev" ]; then
# last reachable hrev-(haiku-revision-)tag
revision=`git describe --dirty --tags --match=hrev*`
if [ -z "$revision" ]; then
# failed to find any hrev tags, use short hash instead
revision=`git rev-parse --short HEAD`
# failed to find any hrev tags, bail out
echo "Error: you are using a Haiku clone without tags, please set"
echo " the revision tag to use (e.g. HAIKU_REVISION=hrev43210)"
exit 1
elif echo "$revision" | grep -- '-' >/dev/null; then
# HEAD is not directly a changeset from Haiku's central repo, so we
# add the current branch name as additional info