Class: Fastlane::Actions::GitReader

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/flutter_version_manager/actions/flutter_version_manager_action.rb

Instance Method Summary collapse

Constructor Details

#initialize(git_path) ⇒ GitReader

Returns a new instance of GitReader.



55
56
57
# File 'lib/fastlane/plugin/flutter_version_manager/actions/flutter_version_manager_action.rb', line 55

def initialize(git_path)
  @git = Git.open(git_path)
end

Instance Method Details

#get_timestampObject



59
60
61
62
63
# File 'lib/fastlane/plugin/flutter_version_manager/actions/flutter_version_manager_action.rb', line 59

def get_timestamp
  head = @git.object('HEAD')
  commit = @git.gcommit(head.sha)
  commit.date.to_i
end