]> git.cworth.org Git - sup/commitdiff
rework Rakefile for "rake gem" and "rake tarball"
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 25 Mar 2009 13:25:48 +0000 (06:25 -0700)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 25 Mar 2009 13:34:51 +0000 (06:34 -0700)
Move version into sup-version.rb and filelist into sup-files.rb. Rake gem
now builds the gem; rake tarball builds the tarball. No Hoe involved.
Update release-script accordingly.

Rakefile
release-script.txt
sup-files.rb [new file with mode: 0644]
sup-version.rb [new file with mode: 0644]
sup.gemspec

index 52ab3808005b9676458f424ddfc52fffa4260a8a..3b1d9f4fa82953e74a5d8af946591f6468749003 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -1,39 +1,8 @@
-require 'rubygems'
-require 'hoe'
-$:.unshift 'lib' # force loading from ./lib/ if it exists
-require 'sup'
-
-## remove hoe dependency entirely
-class Hoe
-  def extra_dev_deps; @extra_dev_deps.reject { |x| x[0] == "hoe" } end
-end
-
-## allow people who use development versions by running "rake gem"
-## and installing the resulting gem it to be able to do this. (gem
-## versions must be in dotted-digit notation only and can be passed
-## with the REL environment variable to "rake gem").
-if ENV['REL']
-  version = ENV['REL']
-else
-  version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION
-end
-Hoe.new('sup', version) do |p|
-  p.rubyforge_name = 'sup'
-  p.author = "William Morgan"
-  p.summary = 'A console-based email client with the best features of GMail, mutt, and emacs. Features full text search, labels, tagged operations, multiple buffers, recent contacts, and more.'
-  p.description = p.paragraphs_of('README.txt', 2..9).join("\n\n")
-  p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[2].gsub(/^\s+/, "")
-  p.changes = p.paragraphs_of('History.txt', 0..0).join("\n\n")
-  p.email = "wmorgan-sup@masanjin.net"
-  p.extra_deps = [['ferret', '>= 0.10.13'], ['ncurses', '>= 0.9.1'], ['rmail', '>= 0.17'], 'highline', 'net-ssh', ['trollop', '>= 1.7'], 'lockfile', 'mime-types', 'gettext', 'fastthread']
-end
-
-rule 'ss?.png' => 'ss?-small.png' do |t|
-end
-
 ## is there really no way to make a rule for this?
 WWW_FILES = %w(www/index.html README.txt doc/Philosophy.txt doc/FAQ.txt doc/NewUserGuide.txt www/main.css)
 
+rule 'ss?.png' => 'ss?-small.png' do |t|
+end
 SCREENSHOTS = FileList["www/ss?.png"]
 SCREENSHOTS_SMALL = []
 SCREENSHOTS.each do |fn|
@@ -59,3 +28,13 @@ task :upload_report do |t|
   sh "ditz html ditz"
   sh "rsync -essh -cavz ditz wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
 end
+
+task :gem do |t|
+  sh "gem1.8 build sup.gemspec"
+end
+
+task :tarball do |t|
+  require "sup-files"
+  require "sup-version"
+  sh "tar cfvz sup-#{SUP_VERSION}.tgz #{SUP_FILES.join(' ')}"
+end
index c94b23f7d622107831a47ac2e5975ef17b47a7ca..3b5b5694e9dd30b0391c1ab84f2c3791194b92f4 100644 (file)
@@ -14,7 +14,8 @@ vi www/index.html # and include CONTRIBUTORS
 git checkout -b release-<releasename>
 vi lib/sup.rb bin/sup # and bump BOTH version numbers
 # ... git add, commit, etc
-gem1.8 build sup.gemspec
+rake gem
+rake tarball
 # manually upload
 git publish-branch
 rake upload_webpage
diff --git a/sup-files.rb b/sup-files.rb
new file mode 100644 (file)
index 0000000..71562f5
--- /dev/null
@@ -0,0 +1,7 @@
+SUP_LIB_DIRS = %w(lib lib/sup lib/sup/modes lib/sup/mbox)
+SUP_EXECUTABLES = %w(sup sup-add sup-config sup-dump sup-recover-sources sup-sync sup-sync-back sup-tweak-labels)
+SUP_EXTRA_FILES = %w(CONTRIBUTORS README.txt LICENSE History.txt ReleaseNotes)
+SUP_FILES =
+  SUP_EXTRA_FILES +
+  SUP_EXECUTABLES.map { |f| "bin/#{f}" } +
+  SUP_LIB_DIRS.map { |d| Dir["#{d}/*.rb"] }.flatten
diff --git a/sup-version.rb b/sup-version.rb
new file mode 100644 (file)
index 0000000..1a10ed2
--- /dev/null
@@ -0,0 +1,15 @@
+## allow people who use development versions by running "rake gem"
+## and installing the resulting gem it to be able to do this. (gem
+## versions must be in dotted-digit notation only and can be passed
+## with the REL environment variable to "rake gem").
+SUP_VERSION = if ENV['REL']
+  ENV['REL']
+else
+  $:.unshift 'lib' # force loading from ./lib/ if it exists
+  require 'sup'
+  if Redwood::VERSION == "git"
+    "999"
+  else
+    Redwood::VERSION
+  end
+end
index 71b79ed707ec3892124c387695483fc461116551..506d8ada7c38e0cbb2ed0ba3cf7907ed05f89cbe 100644 (file)
@@ -1,23 +1,19 @@
 $:.push "lib"
-require "sup"
 
-LIB_DIRS = %w(lib lib/sup lib/sup/modes lib/sup/mbox)
-EXECUTABLES = %w(sup sup-add sup-config sup-dump sup-recover-sources sup-sync sup-sync-back sup-tweak-labels)
-EXTRA_FILES = %w(CONTRIBUTORS README.txt LICENSE History.txt ReleaseNotes)
-
-FILES = EXTRA_FILES + EXECUTABLES.map { |f| "bin/#{f}" } + LIB_DIRS.map { |d| Dir["#{d}/*.rb"] }.flatten
+require "sup-files"
+require "sup-version"
 
 Gem::Specification.new do |s|
   s.name = %q{sup}
-  s.version = Redwood::VERSION
+  s.version = SUP_VERSION
   s.date = Time.now.to_s
   s.authors = ["William Morgan"]
   s.email = %q{wmorgan-sup@masanjin.net}
   s.summary = %q{A console-based email client with the best features of GMail, mutt, and emacs. Features full text search, labels, tagged operations, multiple buffers, recent contacts, and more.}
   s.homepage = %q{http://sup.rubyforge.org/}
   s.description = %q{Sup is a console-based email client for people with a lot of email. It supports tagging, very fast full-text search, automatic contact-list management, and more. If you're the type of person who treats email as an extension of your long-term memory, Sup is for you.  Sup makes it easy to: - Handle massive amounts of email.  - Mix email from different sources: mbox files (even across different machines), Maildir directories, IMAP folders, POP accounts, and GMail accounts.  - Instantaneously search over your entire email collection. Search over body text, or use a query language to combine search predicates in any way.  - Handle multiple accounts. Replying to email sent to a particular account will use the correct SMTP server, signature, and from address.  - Add custom code to handle certain types of messages or to handle certain types of text within messages.  - Organize email with user-defined labels, automatically track recent contacts, and much more!  The goal of Sup is to become the email client of choice for nerds everywhere.}
-  s.files = FILES
-  s.executables = EXECUTABLES
+  s.files = SUP_FILES
+  s.executables = SUP_EXECUTABLES
 
   s.add_dependency "ferret", ">= 0.11.6"
   s.add_dependency "ncurses", ">= 0.9.1"