summaryrefslogtreecommitdiff
path: root/lib/leap_cli/util.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-06-25 20:46:26 -0700
committerelijah <elijah@riseup.net>2013-06-25 20:46:26 -0700
commite486a1d185d5cdf58cc095a79c4c813a74f02cf4 (patch)
treed4743d6cc059cf3801d5eba3ac4835d3e635d18d /lib/leap_cli/util.rb
parent663261bb315ee1d1c693398c7f5ef02cefaaffc1 (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.rb6
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