diff options
author | varac <varacanero@zeromail.org> | 2016-02-21 22:15:46 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-02-21 22:15:46 +0100 |
commit | 12daa2e01a6e8b019752d67a08462385218c68d3 (patch) | |
tree | d304e5695066b8e9dde689fb99890c6e3309c6ef | |
parent | 355244d9a4b74360de67afaa99aba47cf6d9a3b3 (diff) |
[feat] 'leap history --last' shows only last entry
-rw-r--r-- | lib/leap_cli/remote/leap_plugin.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/leap_cli/remote/leap_plugin.rb b/lib/leap_cli/remote/leap_plugin.rb index 50f759e..b48f433 100644 --- a/lib/leap_cli/remote/leap_plugin.rb +++ b/lib/leap_cli/remote/leap_plugin.rb @@ -67,8 +67,9 @@ module LeapCli; module Remote; module LeapPlugin # # dumps the recent deploy history to the console # - def history - run "(test -s /var/log/leap/deploy-summary.log && tail /var/log/leap/deploy-summary.log) || (test -s /var/log/leap/deploy-summary.log.1 && tail /var/log/leap/deploy-summary.log.1) || (echo 'no history')" + def history(lines) + command = "(test -s /var/log/leap/deploy-summary.log && tail -n #{lines} /var/log/leap/deploy-summary.log) || (test -s /var/log/leap/deploy-summary.log.1 && tail -n #{lines} /var/log/leap/deploy-summary.log.1) || (echo 'no history')" + run command end # |