-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
41 lines (36 loc) · 1.16 KB
/
Rakefile
File metadata and controls
41 lines (36 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require 'rubygems'
require 'bundler/setup'
require 'jeweler'
def version
@version ||= File.read("./VERSION").strip
end
Jeweler::Tasks.new do |gem|
commit_date=DateTime.parse(`git log -1 --format=format:%ci`.chomp).strftime("%Y%m%d%H%I%M%S")
gem.name = "contraction"
gem.version = version
gem.summary = "A simple desgin-by-contract library"
gem.description = "Using RDoc documentation as your contract definition, you get solid code, and good docs. Win-win!"
gem.homepage = "https://github.com/thomasluce/contraction"
gem.email = "thomas.luce@gmail.com"
gem.authors = ["Thomas Luce"]
# We don't have any, and I don't want bundler's stuff to just be jammed in
# here.
gem.dependencies.clear
gem.files.reject! do |fn|
fn =~ /^\.rspec.*$/ ||
fn =~ /^\.rvmrc$/ ||
fn =~ /^\.ruby-(version|gemset)$/ ||
fn =~ /^Gemfile(\.lock)?$/ ||
fn =~ /^Rakefile$/ ||
fn =~ /^VERSION$/ ||
fn =~ /^tmp\// ||
fn =~ /^log\// ||
fn =~ /^vendor\/cache\// ||
fn =~ /^spec\//
end
desc 'Build and push to rubygems.org'
task :rubygems => :gemspec do
`gem build contraction.gemspec`
`gem push contraction-#{version}.gem`
end
end