From a462feee610ce907ff11bcb1e2a288dfbb2c1964 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Wed, 28 May 2014 14:38:17 -0400 Subject: [PATCH 1/2] Fix version script failing when HEAD directly contains hash instead of ref to it. --- tools/buildbot/Versioning | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/buildbot/Versioning b/tools/buildbot/Versioning index 23557fcf..24ae962b 100644 --- a/tools/buildbot/Versioning +++ b/tools/buildbot/Versioning @@ -1,5 +1,6 @@ # vim: set ts=8 sts=2 sw=2 tw=99 et ft=python: import os, sys +import re builder.SetBuildFolder('/') @@ -17,11 +18,14 @@ outputs = [ ] with open(os.path.join(builder.sourcePath, '.git', 'HEAD')) as fp: - git_state = fp.read().strip().split(':')[1].strip() - -git_head_path = os.path.join(builder.sourcePath, '.git', git_state) -if not os.path.exists(git_head_path): - git_head_path = os.path.join(builder.sourcePath, '.git', 'HEAD') + head_contents = fp.read().strip() + if re.search('^[a-fA-F0-9]{40}$', head_contents): + git_head_path = os.path.join(builder.sourcePath, '.git', 'HEAD') + else: + git_state = fp.read().strip().split(':')[1].strip() + git_head_path = os.path.join(builder.sourcePath, '.git', git_state) + if not os.path.exists(git_head_path): + git_head_path = os.path.join(builder.sourcePath, '.git', 'HEAD') sources = [ os.path.join(builder.sourcePath, 'product.version'), From ff42e854bb0c896710bc94c5b07b26a21403b0c2 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Wed, 28 May 2014 14:38:55 -0400 Subject: [PATCH 2/2] Add Travis-CI config file. --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..46019885 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: cpp +compiler: + - clang +before_script: + - sudo apt-get update -qq + - sudo apt-get install -y g++-multilib libc6-dev-i386 lib32stdc++6 lib32z1-dev + - CHECKOUT_DIR=$PWD && cd .. && $CHECKOUT_DIR/tools/checkout-deps.sh && cd $CHECKOUT_DIR +script: + - mkdir build && cd build + - python ../configure.py --enable-optimize --sdks=episode1,tf2,l4d2,csgo,dota + - ambuild \ No newline at end of file