commit afb52eea73e2aadf1ef048519316df7a1d6cd188
parent d836c1d8d069bbaf48b818dddbb72accaf3542d2
Author: Iain Parris <ipv2.vcs@parris.org>
Date: Tue, 21 Jul 2020 21:10:14 +0100
re-add Manifest.txt
Manifest.txt was removed in commit 969061797a (2009-08-25).
We are re-adding Manifest.txt now as a prerequisite for PR #580 (to
allow the removal of `git ls-files` from the gemspec).
New Rake tasks added:
- "manifest" - Regenerate Manifest.txt from `git ls-files`
- "check_manifest" - Called by task "travis" (used by Travis CI), to
check that the committed Manifest.txt matches `git ls-files`
Diffstat:
| A |
Manifest.txt |
| |
149 |
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
| M |
Rakefile |
| |
29 |
++++++++++++++++++++++++++++-
|
2 files changed, 177 insertions(+), 1 deletion(-)
diff --git a/Manifest.txt b/Manifest.txt
@@ -0,0 +1,149 @@
+.gitignore
+.gitmodules
+.travis.yml
+CONTRIBUTORS
+Gemfile
+HACKING
+History.txt
+LICENSE
+Manifest.txt
+README.md
+Rakefile
+ReleaseNotes
+bin/sup
+bin/sup-add
+bin/sup-config
+bin/sup-dump
+bin/sup-import-dump
+bin/sup-psych-ify-config-files
+bin/sup-recover-sources
+bin/sup-sync
+bin/sup-sync-back-maildir
+bin/sup-tweak-labels
+contrib/colorpicker.rb
+contrib/completion/_sup.bash
+contrib/completion/_sup.zsh
+devel/console.sh
+devel/count-loc.sh
+devel/load-index.rb
+devel/profile.rb
+devel/start-console.rb
+doc/FAQ.txt
+doc/Hooks.txt
+doc/Philosophy.txt
+doc/wiki
+ext/mkrf_conf_xapian.rb
+lib/sup.rb
+lib/sup/account.rb
+lib/sup/buffer.rb
+lib/sup/colormap.rb
+lib/sup/contact.rb
+lib/sup/crypto.rb
+lib/sup/draft.rb
+lib/sup/hook.rb
+lib/sup/horizontal_selector.rb
+lib/sup/idle.rb
+lib/sup/index.rb
+lib/sup/interactive_lock.rb
+lib/sup/keymap.rb
+lib/sup/label.rb
+lib/sup/logger.rb
+lib/sup/logger/singleton.rb
+lib/sup/maildir.rb
+lib/sup/mbox.rb
+lib/sup/message.rb
+lib/sup/message_chunks.rb
+lib/sup/mode.rb
+lib/sup/modes/buffer_list_mode.rb
+lib/sup/modes/completion_mode.rb
+lib/sup/modes/compose_mode.rb
+lib/sup/modes/console_mode.rb
+lib/sup/modes/contact_list_mode.rb
+lib/sup/modes/edit_message_async_mode.rb
+lib/sup/modes/edit_message_mode.rb
+lib/sup/modes/file_browser_mode.rb
+lib/sup/modes/forward_mode.rb
+lib/sup/modes/help_mode.rb
+lib/sup/modes/inbox_mode.rb
+lib/sup/modes/label_list_mode.rb
+lib/sup/modes/label_search_results_mode.rb
+lib/sup/modes/line_cursor_mode.rb
+lib/sup/modes/log_mode.rb
+lib/sup/modes/person_search_results_mode.rb
+lib/sup/modes/poll_mode.rb
+lib/sup/modes/reply_mode.rb
+lib/sup/modes/resume_mode.rb
+lib/sup/modes/scroll_mode.rb
+lib/sup/modes/search_list_mode.rb
+lib/sup/modes/search_results_mode.rb
+lib/sup/modes/text_mode.rb
+lib/sup/modes/thread_index_mode.rb
+lib/sup/modes/thread_view_mode.rb
+lib/sup/person.rb
+lib/sup/poll.rb
+lib/sup/rfc2047.rb
+lib/sup/search.rb
+lib/sup/sent.rb
+lib/sup/service/label_service.rb
+lib/sup/source.rb
+lib/sup/tagger.rb
+lib/sup/textfield.rb
+lib/sup/thread.rb
+lib/sup/time.rb
+lib/sup/undo.rb
+lib/sup/update.rb
+lib/sup/util.rb
+lib/sup/util/axe.rb
+lib/sup/util/locale_fiddler.rb
+lib/sup/util/ncurses.rb
+lib/sup/util/path.rb
+lib/sup/util/query.rb
+lib/sup/util/uri.rb
+lib/sup/version.rb
+sup.gemspec
+test/dummy_source.rb
+test/fixtures/bad-content-transfer-encoding-1.eml
+test/fixtures/binary-content-transfer-encoding-2.eml
+test/fixtures/blank-header-fields.eml
+test/fixtures/contacts.txt
+test/fixtures/embedded-message.eml
+test/fixtures/mailing-list-header.eml
+test/fixtures/malicious-attachment-names.eml
+test/fixtures/missing-from-to.eml
+test/fixtures/missing-line.eml
+test/fixtures/multi-part-2.eml
+test/fixtures/multi-part.eml
+test/fixtures/no-body.eml
+test/fixtures/non-ascii-header-in-nested-message.eml
+test/fixtures/non-ascii-header.eml
+test/fixtures/rfc2047-header-encoding.eml
+test/fixtures/simple-message.eml
+test/fixtures/text-attachments-with-charset.eml
+test/fixtures/zimbra-quote-with-bottom-post.eml
+test/gnupg_test_home/.gpg-v21-migrated
+test/gnupg_test_home/gpg.conf
+test/gnupg_test_home/private-keys-v1.d/306D2EE90FF0014B5B9FD07E265C751791674140.key
+test/gnupg_test_home/pubring.gpg
+test/gnupg_test_home/receiver_pubring.gpg
+test/gnupg_test_home/receiver_secring.gpg
+test/gnupg_test_home/regen_keys.sh
+test/gnupg_test_home/secring.gpg
+test/gnupg_test_home/sup-test-2@foo.bar.asc
+test/integration/test_label_service.rb
+test/integration/test_maildir.rb
+test/integration/test_mbox.rb
+test/test_crypto.rb
+test/test_header_parsing.rb
+test/test_helper.rb
+test/test_message.rb
+test/test_messages_dir.rb
+test/test_yaml_migration.rb
+test/test_yaml_regressions.rb
+test/unit/service/test_label_service.rb
+test/unit/test_contact.rb
+test/unit/test_horizontal_selector.rb
+test/unit/test_locale_fiddler.rb
+test/unit/test_person.rb
+test/unit/util/test_query.rb
+test/unit/util/test_string.rb
+test/unit/util/test_uri.rb
diff --git a/Rakefile b/Rakefile
@@ -1,6 +1,10 @@
require 'rake/testtask'
require "bundler/gem_tasks"
+# Manifest.txt file in same folder as this Rakefile
+manifest_filename = "#{File.dirname(__FILE__)}/Manifest.txt"
+git_ls_files_command = "git ls-files | LC_ALL=C sort"
+
Rake::TestTask.new(:test) do |test|
test.libs << 'test'
test.test_files = FileList.new('test/**/test_*.rb')
@@ -9,7 +13,7 @@ end
task :default => :test
task :build => [:man]
-task :travis => [:test, :build]
+task :travis => [:test, :check_manifest, :build]
def test_pandoc
return system("pandoc -v > /dev/null 2>&1")
@@ -50,3 +54,26 @@ task :clean do
FileUtils.rm_r d if Dir.exist? d
end
end
+
+task :manifest do
+ manifest = `#{git_ls_files_command}`
+ if $?.success? then
+ puts "Writing `git ls-files` output to #{manifest_filename}"
+ File.write(manifest_filename, manifest, mode: 'w')
+ else
+ abort "Failed to generate Manifest.txt (with `git ls-files`)"
+ end
+end
+
+task :check_manifest do
+ manifest = `#{git_ls_files_command}`
+ manifest_file_contents = File.read(manifest_filename)
+ if manifest == manifest_file_contents
+ puts "Manifest.txt OK"
+ else
+ puts "Manifest from `git ls-files`:\n#{manifest}"
+ STDERR.puts "Manifest.txt outdated. Please commit an updated Manifest.txt"
+ STDERR.puts "To generate Manifest.txt, run: rake manifest"
+ abort "Manifest.txt does not match `git ls-files`"
+ end
+end