diff options
author | elijah <elijah@riseup.net> | 2013-06-25 20:46:26 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-06-25 20:46:26 -0700 |
commit | e486a1d185d5cdf58cc095a79c4c813a74f02cf4 (patch) | |
tree | d4743d6cc059cf3801d5eba3ac4835d3e635d18d /lib/leap_cli/util.rb | |
parent | 663261bb315ee1d1c693398c7f5ef02cefaaffc1 (diff) |
log the version and git info if log level >= 2
Diffstat (limited to 'lib/leap_cli/util.rb')
-rw-r--r-- | lib/leap_cli/util.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/leap_cli/util.rb b/lib/leap_cli/util.rb index f602d89..e52c8a1 100644 --- a/lib/leap_cli/util.rb +++ b/lib/leap_cli/util.rb @@ -420,6 +420,12 @@ module LeapCli end end + def current_git_commit(dir) + Dir.chdir(dir) do + `git rev-parse HEAD 2>/dev/null`.strip + end + end + end end |