Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Get everything ready for packaging

git-svn-id: http://svn.jamisbuck.org/projects/switchtower-ext@3 e3b5881a-3c0d-0410-9405-fd48df27f097
  • Loading branch information...
commit 76e8aa2a28bc804636a722c5e9d8c2eed1aa3b60 1 parent f5bfac1
Jamis Buck authored February 21, 2006
31  Rakefile
... ...
@@ -0,0 +1,31 @@
  1
+require 'rake'
  2
+require 'rake/testtask'
  3
+require 'rake/rdoctask'
  4
+require 'rake/packagetask'
  5
+require 'rake/gempackagetask'
  6
+require 'rake/contrib/rubyforgepublisher'
  7
+
  8
+require "./lib/switchtower/ext/version"
  9
+
  10
+PKG_NAME      = "switchtower-ext"
  11
+PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
  12
+PKG_VERSION   = SwitchTower::Ext::Version::STRING + PKG_BUILD
  13
+PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
  14
+
  15
+GEM_SPEC = eval(File.read("#{File.dirname(__FILE__)}/#{PKG_NAME}.gemspec"))
  16
+
  17
+Rake::GemPackageTask.new(GEM_SPEC) do |p|
  18
+  p.gem_spec = GEM_SPEC
  19
+  p.need_tar = true
  20
+  p.need_zip = true
  21
+end
  22
+
  23
+desc "Build the RDoc API documentation"
  24
+Rake::RDocTask.new do |rdoc|
  25
+  rdoc.rdoc_dir = "doc"
  26
+  rdoc.title    = "SwitchTower Extensions -- A collection of tasks and methods for switchtower"
  27
+  rdoc.options << '--line-numbers --inline-source --main README'
  28
+  rdoc.rdoc_files.include 'README'
  29
+  rdoc.rdoc_files.include 'lib/**/*.rb'
  30
+  rdoc.template = "jamis"
  31
+end
11  lib/switchtower/ext/version.rb
... ...
@@ -0,0 +1,11 @@
  1
+module SwitchTower
  2
+  module Ext
  3
+    module Version #:nodoc:
  4
+      MAJOR = 1
  5
+      MINOR = 0
  6
+      TINY  = 0
  7
+
  8
+      STRING = [MAJOR, MINOR, TINY].join(".")
  9
+    end
  10
+  end
  11
+end
6  switchtower-ext.gemspec
... ...
@@ -1,10 +1,12 @@
  1
+require './lib/switchtower/ext/version'
  2
+
1 3
 Gem::Specification.new do |s|
2 4
 
3 5
   s.name = 'switchtower-ext'
4  
-  s.version = "0.0.1"
  6
+  s.version = PKG_VERSION
5 7
   s.platform = Gem::Platform::RUBY
6 8
   s.summary = <<-DESC.strip.gsub(/\n/, " ")
7  
-    SwitchTower Extensions are a set of useful task libraries and methods that
  9
+    SwitchTower Extensions is a set of useful task libraries and methods that
8 10
     other developers may reference in their own recipe files.
9 11
   DESC
10 12
 

0 notes on commit 76e8aa2

Please sign in to comment.
Something went wrong with that request. Please try again.