whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 32b539c: rerun if any lib files changed
Date Wed, 13 Jan 2016 19:40:27 GMT
Commit 32b539cd915afc259ad863acb8a40a0316166d60:
    rerun if any lib files changed


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
www/roster/public_committee_info.rb                          | +++ -
www/roster/public_icla_info.rb                               | +++++ -
www/roster/public_member_info.rb                             | +++++ -
------------------------------------------------------------
16 changes: 13 additions, 3 deletions.
------------------------------------------------------------


diff --git a/www/roster/public_committee_info.rb b/www/roster/public_committee_info.rb
index 51b4706..93d8fbf 100644
--- a/www/roster/public_committee_info.rb
+++ b/www/roster/public_committee_info.rb
@@ -13,7 +13,9 @@
   # exit quickly if there has been no change
   if File.exist? ARGV.first
     source = "#{ASF::SVN['private/committers/board']}/committee-info.txt"
-    mtime = [File.mtime(source), File.mtime(__FILE__)].max
+    lib = File.expand_path('../../../lib', __FILE__)
+    mtime = Dir["#{lib}/**/*"].map {|file| File.mtime(file)}.max
+    mtime = [mtime, File.mtime(source), File.mtime(__FILE__)].max
     if File.mtime(ARGV.first) >= mtime
       previous_results = JSON.parse(File.read ARGV.first) rescue {}
       exit 0 if previous_results['gem_version'] == GEMVERSION
diff --git a/www/roster/public_icla_info.rb b/www/roster/public_icla_info.rb
index 73fe4b3..12d62de 100644
--- a/www/roster/public_icla_info.rb
+++ b/www/roster/public_icla_info.rb
@@ -1,3 +1,5 @@
+require 'bundler/setup'
+
 require 'whimsy/asf'
 
 GEMVERSION = Gem.loaded_specs['whimsy-asf'].version.to_s rescue nil
@@ -10,7 +12,9 @@
   # exit quickly if there has been no change
   if File.exist? ARGV.first
     source = "#{ASF::SVN['private/foundation/officers']}/iclas.txt"
-    mtime = [File.mtime(source), File.mtime(__FILE__)].max
+    lib = File.expand_path('../../../lib', __FILE__)
+    mtime = Dir["#{lib}/**/*"].map {|file| File.mtime(file)}.max
+    mtime = [mtime, File.mtime(source), File.mtime(__FILE__)].max
     if File.mtime(ARGV.first) >= mtime
       previous_results = JSON.parse(File.read ARGV.first) rescue {}
       exit 0 if previous_results['gem_version'] == GEMVERSION
diff --git a/www/roster/public_member_info.rb b/www/roster/public_member_info.rb
index 49d262b..2707650 100644
--- a/www/roster/public_member_info.rb
+++ b/www/roster/public_member_info.rb
@@ -1,3 +1,5 @@
+require 'bundler/setup'
+
 require 'json'
 require 'whimsy/asf'
 
@@ -12,7 +14,9 @@
   # exit quickly if there has been no change
   if File.exist? ARGV.first
     source = "#{ASF::SVN['private/foundation']}/members.txt"
-    mtime = [File.mtime(source), File.mtime(__FILE__)].max
+    lib = File.expand_path('../../../lib', __FILE__)
+    mtime = Dir["#{lib}/**/*"].map {|file| File.mtime(file)}.max
+    mtime = [mtime, File.mtime(source), File.mtime(__FILE__)].max
     if File.mtime(ARGV.first) >= mtime
       previous_results = JSON.parse(File.read(ARGV.first)) rescue {}
       exit 0 if previous_results['gem_version'] == GEMVERSION

Mime
View raw message