Skip to content
Browse files

Add __GIT_REV__ 'macro' to inject rev into vcl

  • Loading branch information...
1 parent 9b3cbb7 commit 44c7080e54cefbe9ea97d42c10518b7a6e167312 @cosimo committed Dec 20, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 gen_vcl.pl
View
5 gen_vcl.pl
@@ -28,6 +28,11 @@
next;
}
+ elsif ($line =~ m{__GIT_REV__}) {
+ chomp (my $git_rev = `git describe 2>/dev/null || git rev-parse HEAD`);
+ $line =~ s{__GIT_REV__}{$git_rev}e;
+ }
+
push @vcl_code, $line;
}

0 comments on commit 44c7080

Please sign in to comment.
Something went wrong with that request. Please try again.