Permalink
Browse files

Move tasks to single rake file

  • Loading branch information...
Stefan Roex
Stefan Roex committed Dec 28, 2013
1 parent 4b5c981 commit 99b0b2406e020c09e1959445662020cd8cfe3c84
Showing with 23 additions and 26 deletions.
  1. +3 −0 Gemfile
  2. +20 −4 Rakefile
  3. +0 −8 lib/tasks/release.rake
  4. +0 −14 lib/tasks/rspec.rake
@@ -0,0 +1,3 @@
source "http://rubygems.org"

gemspec
@@ -4,11 +4,27 @@ rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end

require 'bundler'
Bundler::GemHelper.install_tasks
PROJECTS = %w{core pages attachments}

Dir[File.expand_path('../lib/tasks/**/*', __FILE__)].each do |task|
load task
PROJECTS.each do |name|
task "spec_#{name}" do
cmd_in_dir name, "bundle exec rake"
end
end

multitask spec: PROJECTS.map { |name| "spec_#{name}" }
task :default => :spec

task "release:all" do
version = File.read(File.expand_path("../../../VERSION",__FILE__)).strip
sh "rake release"
PROJECTS.each do |name|
cmd_in_dir name, "rake build && gem push pkg/brightcontent-#{name}-#{version}.gem"
end
end

def cmd_in_dir(dir, command)
Bundler.with_clean_env do
sh "cd #{dir} && #{command}"
end
end

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

0 comments on commit 99b0b24

Please sign in to comment.