2015-08-25 18:47:19 +00:00
|
|
|
require 'rugged'
|
|
|
|
|
|
|
|
environmentpath = ARGV[0]
|
|
|
|
environment = ARGV[1]
|
|
|
|
|
|
|
|
repo = Rugged::Repository.discover(File.join(environmentpath, environment))
|
|
|
|
head = repo.head
|
|
|
|
|
|
|
|
#sha1 hash of the newest commit
|
|
|
|
head_sha = head.target_id
|
|
|
|
|
|
|
|
#the commit message associated the newest commit
|
|
|
|
commit = repo.lookup(head_sha)
|
|
|
|
|
|
|
|
#add something to find the remote url
|
|
|
|
|
2015-08-31 20:20:43 +00:00
|
|
|
puts head_sha
|