forked from tsemana/workoutzenith
/
Rakefile
31 lines (25 loc) · 886 Bytes
/
Rakefile
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
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
require 'colored'
Workoutzenith::Application.load_tasks
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`
`bundle exec rake dist --trace`
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 :all => [:ember, :data]
end