Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 66 lines (52 sloc) 1.785 kb
8d98d57 @wycats Salesforce adapter becomes a gem
wycats authored
1 require 'rake/gempackagetask'
2 require 'rubygems/specification'
3 require 'date'
f267c10 @atmos update to bundler version 0.5.x syntax
atmos authored
4 require 'pp'
cd4f86f @atmos exclude apple's tmpdirs and vendor from rcov metrics
atmos authored
5 require 'tmpdir'
74f5dda @atmos goodbye rubundler, hello thor bundling plus classical ruby requirements....
atmos authored
6
6ac9fa7 @adelcambre Upgrade to bundler 1.0, use gemspec
adelcambre authored
7 require 'bundler/setup'
8d98d57 @wycats Salesforce adapter becomes a gem
wycats authored
8
6ac9fa7 @adelcambre Upgrade to bundler 1.0, use gemspec
adelcambre authored
9 Bundler.require
8d98d57 @wycats Salesforce adapter becomes a gem
wycats authored
10
5376eee @atmos Refactor the classes and add some simple specs
atmos authored
11 task :default => 'spec'
12 require 'spec'
13 require 'spec/rake/spectask'
14 desc "Run specs"
15 Spec::Rake::SpecTask.new(:spec) do |t|
91d7d98 @halorgium Switch to the new bundler
authored
16 t.spec_opts << %w(-fs --color) << %w(-O spec/spec.opts)
5376eee @atmos Refactor the classes and add some simple specs
atmos authored
17 t.spec_opts << '--loadby' << 'random'
8c48a28 @ultraninja Cleaned up the namespaces, Added tests for the SQL operators, removed a ...
ultraninja authored
18 t.spec_files = Dir["spec/**/*_spec.rb"]
5376eee @atmos Refactor the classes and add some simple specs
atmos authored
19 t.rcov = ENV.has_key?('NO_RCOV') ? ENV['NO_RCOV'] != 'true' : true
cd4f86f @atmos exclude apple's tmpdirs and vendor from rcov metrics
atmos authored
20 t.rcov_opts << '--exclude' << "~/.salesforce,gems,vendor,/var/folders,spec,config,tmp"
5376eee @atmos Refactor the classes and add some simple specs
atmos authored
21 t.rcov_opts << '--text-summary'
22 t.rcov_opts << '--sort' << 'coverage' << '--sort-reverse'
23 end
24
25 desc "Release the version"
241a196 @adelcambre build the package before releasing it
adelcambre authored
26 task :release => :repackage do
5376eee @atmos Refactor the classes and add some simple specs
atmos authored
27 version = DataMapperSalesforce::VERSION
28 puts "Releasing #{version}"
29
30 `git show-ref tags/v#{version}`
31 unless $?.success?
32 abort "There is no tag for v#{version}"
33 end
34
35 `git show-ref heads/releasing`
36 if $?.success?
37 abort "Remove the releasing branch, we need it!"
38 end
39
40 puts "Checking out to the releasing branch as the tag"
41 system("git", "checkout", "-b", "releasing", "tags/v#{version}")
42
43 puts "Reseting back to master"
44 system("git", "checkout", "master")
45 system("git", "branch", "-d", "releasing")
46
87bd789 @halorgium Improve the version bump code
authored
47 current = @spec.version.to_s + ".0"
48 next_version = Gem::Version.new(current).bump
5376eee @atmos Refactor the classes and add some simple specs
atmos authored
49
50 puts "Changing the version to #{next_version}."
51
4ee3590 @atmos make sure this can release properly
atmos authored
52 version_file = File.dirname(__FILE__)+"/lib/#{GEM}/version.rb"
5376eee @atmos Refactor the classes and add some simple specs
atmos authored
53 File.open(version_file, "w") do |f|
54 f.puts <<-EOT
55 module DataMapperSalesforce
56 VERSION = "#{next_version}"
57 end
58 EOT
8d98d57 @wycats Salesforce adapter becomes a gem
wycats authored
59 end
5376eee @atmos Refactor the classes and add some simple specs
atmos authored
60
61 puts "Committing the version change"
62 system("git", "commit", version_file, "-m", "Next version: #{next_version}")
63
64 puts "Push the commit up! if you don't, you'll be hunted down"
675bc10 @halorgium Bump the version
authored
65 end
Something went wrong with that request. Please try again.