Top Level Namespace

Defined Under Namespace

Modules: Fluent, OCILogging, OS

Instance Method Summary collapse

Instance Method Details

#number_of_commitsObject



10
11
12
13
14
15
# File 'lib/version.rb', line 10

def number_of_commits
  tstamp = Time.now.utc.strftime('%Y%m%d%H%M%S').to_s
  cmd = 'git log --pretty=oneline | wc -l'
  stdout_str, stderr_str, status = Open3.capture3(cmd)
  status.success? ? stdout_str.strip() : "rc-#{tstamp}"
end