Skip to content

Instantly share code, notes, and snippets.

@jbarnette
Created July 27, 2009 21:39
Show Gist options
  • Save jbarnette/156754 to your computer and use it in GitHub Desktop.
Save jbarnette/156754 to your computer and use it in GitHub Desktop.
diff --git a/lib/hoe/git.rb b/lib/hoe/git.rb
index 463d5c0..c51e70b 100644
--- a/lib/hoe/git.rb
+++ b/lib/hoe/git.rb
@@ -60,6 +60,18 @@ class Hoe #:nodoc:
puts
end
+ desc "Update the manifest with Git's file list. Use Hoe's excludes."
+ task "git:manifest" do
+ with_config do |config, _|
+ files = `git ls-files`.split "\n"
+ files.reject! { |f| f =~ config["exclude"] }
+
+ File.open "Manifest.txt", "w" do |f|
+ f.puts files.sort.join("\n")
+ end
+ end
+ end
+
desc "Create and push a TAG " +
"(default #{git_release_tag_prefix}#{version})."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment