File tree Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Original file line number Diff line number Diff line change 1- require 'rugged'
1+ begin
2+ require 'rugged'
3+ rescue LoadError => e
4+ t = Time . new
5+ puts t . to_i
6+ else
27
3- environmentpath = ARGV [ 0 ]
4- environment = ARGV [ 1 ]
8+ environmentpath = ARGV [ 0 ]
9+ environment = ARGV [ 1 ]
510
6- repo = Rugged ::Repository . discover ( File . join ( environmentpath , environment ) )
7- head = repo . head
11+ repo = Rugged ::Repository . discover ( File . join ( environmentpath , environment ) )
12+ head = repo . head
813
9- #sha1 hash of the newest commit
10- head_sha = head . target_id
14+ #sha1 hash of the newest commit
15+ head_sha = head . target_id
1116
12- #the commit message associated the newest commit
13- commit = repo . lookup ( head_sha )
17+ #the commit message associated the newest commit
18+ commit = repo . lookup ( head_sha )
1419
15- #add something to find the remote url
20+ #add something to find the remote url
1621
17- puts head_sha
22+ puts head_sha
23+ end
You can’t perform that action at this time.
0 commit comments