1. Stefan Saasen
  2. spy

Commits

Stefan Saasen  committed 8ea3529

Add CONTRIBUTORS file

  • Participants
  • Parent commits c7349a6
  • Branches master

Comments (0)

Files changed (2)

File CONTRIBUTORS

View file
  • Ignore whitespace
+Stefan Saasen
+Laurie Clark-Michalek

File Rakefile

View file
  • Ignore whitespace
 end
 
 desc "Build and package the spy distribution"
-task :package => [:build, :generate_man] do
+task :package => [:build, :generate_man, :contributors] do
   include FileUtils
   with_temp_dir "spy" do |package_dir|
     cp "README.md", package_dir
-    %w(LICENSE).each {|f| cp f, package_dir }
+    %w(LICENSE CONTRIBUTORS).each {|f| cp f, package_dir }
     bin_dir = File.join(package_dir, "bin")
     mkdir bin_dir
     cp ARTIFACT, bin_dir
   end
 end
 
+desc "Update CONTRIBUTORS file"
+task :contributors do
+  File.open("CONTRIBUTORS", "w") do |f|
+    `git shortlog -s -n`.split("\n").each do |line|
+      n, name = line.split("\t")
+      f << name
+      f << "\n"
+    end
+  end
+end
+
 desc "Update version to the next minor version, tag the result"
 task :bump_minor_version do
   current_version = `git describe --tags`.strip.split("-").first.gsub(/^v/, '')