&& $pom =~ /[.]json$/ ) {
require JSON;
my $json = eval { JSON::decode_json($xml) }
or do { warn "Could not read $xml as json : $@\n"; };
return $json->{version};
}
if ( $pom && $pom =~ /[.]ya?ml$/ ) {
require YAML;
my $json = YAML::Load($xml);
return $json->{version};
}
my $doc = XML::Tiny::parsefile( $xml !~ /\n/ && -f $x
rmat_json {
my (undef, $csv, @releases) = @_;
require JSON;
my $repo = $workflow->config('remote.origin.url');
my ($name) = $repo =~ m{[/:](.*?)(?:[.]git)?$}xms;
print JSON::en
code_json({
repository => $repo,
name => $name,
release => $releases[-1]{name},
release_date => '' . localtime($releases[-1]{time}),
branches
er)
-l --local Shorthand for --branch '^master$'
-f --format[=](test|text|html|csv|tab|json)
Set the out put format
* test - TAP test formatted out
t = 1;
print Dumper $changed;
return;
}
sub out_json {
my ($self, $changed) = @_;
require JSON;
print JSON::encode_json($changed), "\n";
return;
}
sub out_yaml {
my ($
1.1.20
=head1 SYNOPSIS
git-recent [-since=YYYY-MM-DD|--day|--week|--month] [(-o|--out) [text|json|perl]]
git-recent --help
git-recent --man
git-recent --version
OPTIONS:
-s --since[=
-o --out[=](text|json|perl)
Specify how to display the results
- text : Nice human readable format (Default)
- json : as a JSON object
;
}
}
return;
}
1;
__DATA__
=head1 NAME
git-pom - Manage pom.xml (or package.json) file versions
=head1 VERSION
This documentation refers to git-pom version 1.1.20
=head1 SYNOP
e English qw/ -no_match_vars /;
use Pod::Usage;
use Term::ANSIColor qw/colored/;
use JSON qw/decode_json encode_json/;
use App::Git::Workflow;
use App::Git::Workflow::Command qw/get_options/;
our $VE
ub set_memos {
my ( $self, $json ) = @_;
my $git_dir = $workflow->git->rev_parse("--show-toplevel");
chomp $git_dir;
my $memo = "$git_dir/.git/memo.json";
open my $fh, '>', $memo
} encode_json($json), "\n";
}
sub get_memos {
my ($self) = @_;
my $git_dir = $workflow->git->rev_parse("--show-toplevel");
chomp $git_dir;
my $memo = "$git_dir/.git/memo.json";
i
nt "Total commits = $total\n";
return;
}
sub fmt_json {
my ($self, $users, $total) = @_;
require JSON;
print JSON::encode_json({ total => $total, users => $users });
}
sub fmt_perl
h --format json)
-s --since[=]YYYY-MM-DD
Only commits since this date
-u --until[=]YYYY-MM-DD
Only commits up until this date
-f --format[=](table|json|csv)
- table : shows the data in a simple table
- json : returns the raw data as a json object
- perl : Dump the data structure
-p --period=[day|w
totals{commit_count}\n";
}
return;
}
sub fmt_json {
my ($self, $users, $total) = @_;
require JSON;
print JSON::encode_json({ total => $total, users => $users });
}
sub fmt_perl
h --format json)
-s --since[=]YYYY-MM-DD
Only commits since this date
-u --until[=]YYYY-MM-DD
Only commits up until this date
-f --format[=](table|json|csv)
- table : shows the data in a simple table
- json : returns the raw data as a json object
- perl : Dump the data structure
-p --period=[day|w