sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 4bf989f99f4edf59b26b0a72ca5345895acb1018
parent 0a6886f37a40101306e15b5f50e22dfa57c1fe49
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Tue, 22 Jan 2008 12:16:29 -0800

Merge branch 'bin-lib-versions'

Conflicts:

	lib/sup.rb

Diffstat:
M Rakefile | 7 ++++++-
M bin/sup | 14 ++++++++++++++
M lib/sup.rb | 2 +-
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/Rakefile b/Rakefile
@@ -7,7 +7,12 @@ class Hoe
   def extra_deps; @extra_deps.reject { |x| Array(x).first == "hoe" } end
 end # thanks to "Mike H"
 
-Hoe.new('sup', Redwood::VERSION) do |p|
+## 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).
+version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION
+
+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.'
diff --git a/bin/sup b/bin/sup
@@ -7,6 +7,20 @@ require 'fileutils'
 require 'trollop'
 require "sup"
 
+BIN_VERSION = "git"
+
+unless Redwood::VERSION == BIN_VERSION
+  $stderr.puts <<EOS
+
+Error: version mismatch!
+The sup executable is at version #{BIN_VERSION.inspect}.
+The sup libraries are at version #{Redwood::VERSION.inspect}.
+
+Is your development environment conflicting with rubygems?
+EOS
+  exit(-1)
+end
+
 $exceptions = []
 $opts = Trollop::options do
   version "sup v#{Redwood::VERSION}"
diff --git a/lib/sup.rb b/lib/sup.rb
@@ -33,7 +33,7 @@ class Module
 end
 
 module Redwood
-  VERSION = "0.3"
+  VERSION = "git"
 
   BASE_DIR   = ENV["SUP_BASE"] || File.join(ENV["HOME"], ".sup")
   CONFIG_FN  = File.join(BASE_DIR, "config.yaml")