mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 01:17:42 -04:00
Updated to proper paths
This commit is contained in:
parent
b0374f7ff4
commit
b77729948d
11 changed files with 10 additions and 7 deletions
23
puppet/production/scripts/config_version.rb
Executable file
23
puppet/production/scripts/config_version.rb
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env ruby
|
||||
begin
|
||||
require 'rugged'
|
||||
rescue LoadError
|
||||
t = Time.new
|
||||
puts t.to_i
|
||||
else
|
||||
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
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue