whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <...@apache.org>
Subject [whimsy.git] [1/1] Commit ac8bc55: Add utility to sort members.txt
Date Mon, 28 Mar 2016 01:03:28 GMT
Commit ac8bc5506f658150a750eccdac983f6340c0038d:
    Add utility to sort members.txt


Branch: refs/heads/master
Author: Craig L Russell <craig.russell@oracle.com>
Committer: Craig L Russell <craig.russell@oracle.com>
Pusher: clr <clr@apache.org>

------------------------------------------------------------
tools/membersort.rb                                          | ++++++++++++ 
------------------------------------------------------------
23 changes: 23 additions, 0 deletions.
------------------------------------------------------------


diff --git a/tools/membersort.rb b/tools/membersort.rb
new file mode 100644
index 0000000..98b1730
--- /dev/null
+++ b/tools/membersort.rb
@@ -0,0 +1,23 @@
+# svn update and sort the members.txt file and show the differences
+
+$LOAD_PATH.unshift File.realpath(File.expand_path('../../lib', __FILE__))
+require 'whimsy/asf'
+
+FOUNDATION = ASF::SVN['private/foundation']
+
+Dir.chdir FOUNDATION
+
+members = FOUNDATION + '/members.txt'
+puts 'svn update ' + members
+system 'svn update ' + members
+
+source = File.read('members.txt')
+sorted = ASF::Member.sort(source)
+
+if source == sorted
+  puts 'no change'
+else
+  File.write('members.txt', sorted)
+  system 'svn diff members.txt'
+end
+

Mime
View raw message