lib/marty/diagnostic/version.rb in marty-14.0.0 vs lib/marty/diagnostic/version.rb in marty-14.3.0

- old
+ new

@@ -1,7 +1,13 @@ module Marty::Diagnostic class Version < Base + def self.git_tag + git_tag = `cd #{Rails.root}; git describe --tags --always --abbrev=7;`.strip + git_datetime = `cd #{Rails.root}; git log -1 --format=%cd;`.strip + "#{git_tag} (#{git_datetime})" + end + diagnostic_fn do begin submodules = `cd #{Rails.root}; git submodule`.split("\n").map do |s| sha, path, tag = s.split name = File.basename(path) @@ -9,15 +15,14 @@ "#{name}_sha".titleize => sha[0..7], "#{name}_tag".titleize => tag, } end.reduce(&:merge) || {} - git_tag = `cd #{Rails.root}; git describe --tags --always --abbrev=7;`.strip - git_datetime = `cd #{Rails.root}; git log -1 --format=%cd;`.strip - git = { 'Root Git' => "#{git_tag} (#{git_datetime})" }.merge(submodules) + git = { 'Root Git' => git_tag }.merge(submodules) rescue StandardError git = { 'Root Git' => error('Failed accessing git') } end + rbv = "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})" { 'Marty' => Marty::VERSION, 'Delorean' => Delorean::VERSION, 'Mcfly' => Mcfly::VERSION,