cd to $RealBin instead of git -C
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Sun, 6 Nov 2016 22:33:24 +0000 (23:33 +0100)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Sun, 6 Nov 2016 22:33:59 +0000 (23:33 +0100)
Older gits don't support -C

run_build

index fe3ea9294d4af1579228297f9c3e9b44bf74b369..ef80039c6b131b0d11f954406dc5230c8a84e6b0 100755 (executable)
--- a/run_build
+++ b/run_build
@@ -43,7 +43,7 @@ use File::Copy;
 use File::Basename;
 use File::Temp;
 use File::Spec;
-use FindBin qw'$Bin';
+use FindBin qw'$RealBin';
 use IO::Handle;
 use POSIX qw(:signal_h strftime);
 use Data::Dumper;
@@ -1452,9 +1452,9 @@ sub get_script_config_dump
     delete $conf->{secret};
 
     if ($conf->{scm} eq 'git') {
-        chomp($conf->{farm}{revision} = `git -C $Bin describe --tags --always --dirty=+`);
+        chomp($conf->{farm}{revision} = `cd $RealBin && git describe --tags --always --dirty=+`);
        $conf->{farm}{cwd} = getcwd();
-       $conf->{farm}{bindir} = $Bin;
+       $conf->{farm}{bindir} = $RealBin;
     }
 
     $Data::Dumper::Sortkeys = 1;