Module: Usps::Support::Helpers::GitHelper
- Defined in:
- lib/usps/support/helpers/git_helper.rb
Overview
Get git identifying information
:nocov:
Instance Method Summary collapse
Instance Method Details
#current_git_tag ⇒ Object
8 9 10 11 12 |
# File 'lib/usps/support/helpers/git_helper.rb', line 8 def current_git_tag prod_current_tag if Rails.env.production? @current_git_tag = 'TESTING' if Rails.env.test? dev_current_tag if Rails.env.development? end |
#dev_current_tag ⇒ Object
19 20 21 22 |
# File 'lib/usps/support/helpers/git_helper.rb', line 19 def dev_current_tag @current_git_tag = `git describe --tags --abbrev=0`.chomp @current_branch = `git branch --show-current`.chomp end |
#prod_current_tag ⇒ Object
14 15 16 17 |
# File 'lib/usps/support/helpers/git_helper.rb', line 14 def prod_current_tag @current_git_tag = Rails.root.join('TAG').read.chomp @current_branch = Rails.root.join('BRANCH').read.chomp end |