Skip to content

Commit

Permalink
[config] Make git-related config steps do nothing unless we are in a …
Browse files Browse the repository at this point in the history
…Git repo
  • Loading branch information
leto committed Nov 17, 2010
1 parent 7151902 commit a5ba11a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/auto/git_describe.pm
Expand Up @@ -31,6 +31,8 @@ sub _init {
sub runstep {
my ( $self, $conf ) = @_;

return 1 unless -e '.git';

my $describe = $Parrot::Git::Describe::current;

if ( defined($describe) and $describe !~ /^REL(EASE)?_\d+_\d+_\d+(-\d+-g[0-9A-Fa-f]{7})?$/ ) {
Expand Down
2 changes: 2 additions & 0 deletions config/auto/sha1.pm
Expand Up @@ -30,6 +30,8 @@ sub _init {
sub runstep {
my ( $self, $conf ) = @_;

return 1 unless -e '.git';

my $sha1 = $Parrot::SHA1::current;
my $abbrev_sha1;

Expand Down

0 comments on commit a5ba11a

Please sign in to comment.