jbarnette (owner)

Revisions

gist: 156754 Download_button fork
public
Public Clone URL: git://gist.github.com/156754.git
Embed All Files: show embed
Diff #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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})."