Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[yapsi] implemented --version
Idea shamelessly stolen from Rakudo. pmichaud++
  • Loading branch information
Carl Masak committed Jul 5, 2010
1 parent f2020b2 commit 513948d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions yapsi
Expand Up @@ -5,6 +5,15 @@ use Yapsi;

my @TARGETS = <run sic>;

if @*ARGS && @*ARGS[0] eq '--version' {
my $revision = qx[git describe];
say "This is Yapsi, revision $revision";
shift @*ARGS;
unless @*ARGS {
push @*ARGS, '-e', '';
}
}

my $target = 'run';
if @*ARGS && @*ARGS[0] ~~ /'--target='(\w+)/ {
die "Recognized targets: {@TARGETS}"
Expand Down

0 comments on commit 513948d

Please sign in to comment.