forked from emberjs/data
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathRakefile
32 lines (25 loc) · 891 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
32
require "bundler/setup"
require "ember-dev/tasks"
require 'pathname'
require 'fileutils'
directory "tmp"
task :docs => "ember:docs"
task :clean => "ember:clean"
task :dist => "ember:dist"
task :test, [:suite] => "ember:test"
task :default => :test
task :publish_build => [:dist, :docs, 'ember:generate_static_test_site'] do
root_dir = Pathname.new(__FILE__).dirname
dist_dir = root_dir.join('dist')
FileUtils.cp root_dir.join('docs', 'build', 'data.json'),
dist_dir.join('ember-data-docs.json')
files = %w{ember-data.js ember-data-docs.json
ember-data-spade.js ember-data-tests.js
ember-data-tests.html}
EmberDev::Publish.to_s3({
:access_key_id => ENV['S3_ACCESS_KEY_ID'],
:secret_access_key => ENV['S3_SECRET_ACCESS_KEY'],
:bucket_name => ENV['S3_BUCKET_NAME'],
:files => files.map { |f| dist_dir.join(f) }
})
end