f5cb1fa757
The config_version now uses a script that will do one of two things: 1. call config_version.rb which uses rugged to find the information about the latest commit if PE is on version 2015.2 or newer 2. make a call to git if the PE version is less than 2015.2
18 lines
359 B
Ruby
18 lines
359 B
Ruby
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
|
|
|
|
puts head_sha
|