Run git describe in the farm client directory, not in the cwd
[buildfarm-client.git] / run_build
index 952e4a91207cd88d41e03ea31716e5ab05367b00..d2de73fbb2d87e368123fa2d690a341ff020e642 100755 (executable)
--- a/run_build
+++ b/run_build
@@ -43,6 +43,7 @@ use File::Copy;
 use File::Basename;
 use File::Temp;
 use File::Spec;
+use FindBin qw'$Bin';
 use IO::Handle;
 use POSIX qw(:signal_h strftime);
 use Data::Dumper;
@@ -1430,7 +1431,9 @@ sub get_script_config_dump
     delete $conf->{secret};
 
     if ($conf->{scm} eq 'git') {
-        chomp($conf->{farm}{revision} = `git describe --tags --always --dirty=+`);
+        chomp($conf->{farm}{revision} = `git -C $Bin describe --tags --always --dirty=+`);
+       $conf->{farm}{cwd} = getcwd();
+       $conf->{farm}{bindir} = $Bin;
     }
 
     $Data::Dumper::Sortkeys = 1;