Permalink
Browse files

Add upgrade tasks

  • Loading branch information...
pangratz committed Jul 21, 2012
1 parent acd7409 commit b58f7f3ec884d1db0948269fbdbe2e404a519f5e
Showing with 36 additions and 0 deletions.
  1. +36 −0 Rakefile
@@ -55,3 +55,39 @@ task :deploy => :build do
puts "\n## Github Pages deploy complete -- http://#{username}.github.com/dashboard"
end
end
namespace :upgrade do
def download_ember(repo_name, source = repo_name, target = source)
FileUtils.rm_rf "tmp/#{repo_name}"
`git clone https://github.com/emberjs/#{repo_name} tmp/#{repo_name}`
Dir.chdir("tmp/#{repo_name}") do
`bundle install`
`rake dist`
end
FileUtils.copy "tmp/#{repo_name}/dist/#{source}", "app/vendor/#{target}"
FileUtils.rm_rf "tmp/#{repo_name}"
end
task :ember do
download_ember("ember.js")
end
task :data do
download_ember("data", "ember-data.js")
end
task :qunit do
FileUtils.rm_rf "tmp/qunit"
`git clone https://github.com/jquery/qunit tmp/qunit`
Dir.chdir("tmp/qunit") do
latest_tag = `git describe --abbrev=0 --tags`
system "git checkout #{latest_tag}"
end
FileUtils.cp_r "tmp/qunit/qunit/.", "tests/qunit"
FileUtils.rm_rf "tmp/qunit"
end
task :all => [:ember, :data, :qunit]
end
task :upgrade => ["upgrade:all"]

0 comments on commit b58f7f3

Please sign in to comment.