auto git commit
This commit is contained in:
parent
4a535b7fee
commit
ca5090dfb2
2 changed files with 9 additions and 1 deletions
7
revbank
7
revbank
|
@ -123,6 +123,11 @@ sub now {
|
||||||
return strftime '%Y-%m-%d_%H:%M:%S', localtime;
|
return strftime '%Y-%m-%d_%H:%M:%S', localtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub git_commit {
|
||||||
|
system qw(git commit -q revbank.accounts .revbank.undo),
|
||||||
|
-m => "Transaction by $user";
|
||||||
|
}
|
||||||
|
|
||||||
sub parse_product {
|
sub parse_product {
|
||||||
my ($id) = @_;
|
my ($id) = @_;
|
||||||
my @products;
|
my @products;
|
||||||
|
@ -380,6 +385,7 @@ sub undo {
|
||||||
} else {
|
} else {
|
||||||
print "Transaction ID '$tid' not found in undo log.\n";
|
print "Transaction ID '$tid' not found in undo log.\n";
|
||||||
}
|
}
|
||||||
|
git_commit();
|
||||||
return ['noop'];
|
return ['noop'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -520,6 +526,7 @@ LINE: for (;;) {
|
||||||
my ($old, $new) = update_account($_, $delta);
|
my ($old, $new) = update_account($_, $delta);
|
||||||
}
|
}
|
||||||
close $ufh;
|
close $ufh;
|
||||||
|
git_commit();
|
||||||
|
|
||||||
my $deposit = sum map $_->[1], grep { $_->[0] eq 'deposit' } @todo;
|
my $deposit = sum map $_->[1], grep { $_->[0] eq 'deposit' } @todo;
|
||||||
if ($deposit) {
|
if ($deposit) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
649241869825 0.00 Free disgusting stuff
|
# Free stuff
|
||||||
|
649241869825 0.00 Free disgusting stuff (LS)
|
||||||
|
|
||||||
# Water
|
# Water
|
||||||
5400151013112 0.50 Carbonated mineral water
|
5400151013112 0.50 Carbonated mineral water
|
||||||
|
|
Loading…
Add table
Reference in a new issue