whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Bazley <s...@apache.org>
Subject [whimsy.git] [1/1] Commit 906da86: Show the remote repo info
Date Fri, 01 Apr 2016 16:23:28 GMT
Commit 906da86811344bf479f159b194db56961bc2f81e:
    Show the remote repo info


Branch: refs/heads/master
Author: Sebb <sebb@apache.org>
Committer: Sebb <sebb@apache.org>
Pusher: sebb <sebb@apache.org>

------------------------------------------------------------
www/status/index.cgi                                         | +++ 
------------------------------------------------------------
3 changes: 3 additions, 0 deletions.
------------------------------------------------------------


diff --git a/www/status/index.cgi b/www/status/index.cgi
index 040b111..1716f1f 100755
--- a/www/status/index.cgi
+++ b/www/status/index.cgi
@@ -5,6 +5,8 @@ require 'time'
 json = File.expand_path('../status.json', __FILE__)
 status = JSON.parse(File.read(json)) rescue {}
 git_info = `git show --format="%h  %ci"  -s HEAD`.strip rescue "?"
+# TODO better format; don't assume we use master
+git_repo = `git ls-remote origin master`.strip rescue "?"
 
 # Get new status every minute
 if not status['mtime'] or Time.now - Time.parse(status['mtime']) > 60
@@ -64,6 +66,7 @@ print <<-EOF
       <li><a href="passenger">Passenger</a> (ASF committer only)</li>
       <li><a href="svn">Subversion</a></li>
       <li>Git code info: #{git_info}</li>
+      <li>Git repo info: #{git_repo}</li>
     </ul>
   </body>
 </html>

Mime
View raw message