Remove rake build assets
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
source "http://rubygems.org"
|
||||
|
||||
gem "rake"
|
||||
gem "json"
|
||||
gem "nokogiri"
|
||||
gem "aws-sdk"
|
||||
gem "uuidtools"
|
||||
@@ -1,21 +0,0 @@
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
aws-sdk (1.10.0)
|
||||
json (~> 1.4)
|
||||
nokogiri (>= 1.4.4)
|
||||
uuidtools (~> 2.1)
|
||||
json (1.8.0)
|
||||
nokogiri (1.5.9)
|
||||
rake (10.0.3)
|
||||
uuidtools (2.1.4)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
aws-sdk
|
||||
json
|
||||
nokogiri
|
||||
rake
|
||||
uuidtools
|
||||
+4
-8
@@ -340,8 +340,7 @@ and we will have some benchmarks in the near future.
|
||||
Building
|
||||
--------
|
||||
|
||||
To build handlebars, just run `rake build`, and you will get two files
|
||||
in the `dist` directory.
|
||||
To build handlebars, just run `grunt build`, and the build will output to the `dist` directory.
|
||||
|
||||
|
||||
Upgrading
|
||||
@@ -394,16 +393,13 @@ To build Handlebars.js you'll need a few things installed.
|
||||
|
||||
* Node.js
|
||||
* [Grunt](http://gruntjs.com/getting-started)
|
||||
* Ruby
|
||||
* Rake
|
||||
|
||||
There's a Gemfile in the repo, so you can run `bundle` to install rake
|
||||
if you've got bundler installed.
|
||||
Project dependencies may be installed via `npm install`.
|
||||
|
||||
To build Handlebars.js from scratch, you'll want to run `grunt`
|
||||
in the root of the project. That will build Handlebars and output the
|
||||
results to the dist/ folder. To run tests, run `grunt test` or `npm test`.
|
||||
You can also run our set of benchmarks with `rake bench`.
|
||||
results to the dist/ folder. To re-run tests, run `grunt test` or `npm test`.
|
||||
You can also run our set of benchmarks with `grunt bench`.
|
||||
|
||||
If you notice any problems, please report them to the GitHub issue tracker at
|
||||
[http://github.com/wycats/handlebars.js/issues](http://github.com/wycats/handlebars.js/issues).
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
task :default => [:build]
|
||||
|
||||
task :build do |task|
|
||||
system "grunt"
|
||||
end
|
||||
|
||||
def dist_files(&block)
|
||||
map = {}
|
||||
|
||||
root = File.expand_path(File.dirname(__FILE__)) + '/dist/'
|
||||
|
||||
files = ['handlebars.js', 'handlebars.min.js', 'handlebars.runtime.js', 'handlebars.runtime.min.js'].map { |file| root + file }
|
||||
files = files.map do |file|
|
||||
basename = Pathname.new(file).basename.sub_ext('')
|
||||
map[file] = yield basename
|
||||
end
|
||||
map
|
||||
end
|
||||
|
||||
def publish_s3(files)
|
||||
access_key_id = ENV['S3_ACCESS_KEY_ID']
|
||||
secret_access_key = ENV['S3_SECRET_ACCESS_KEY']
|
||||
bucket_name = ENV['S3_BUCKET_NAME']
|
||||
|
||||
if files && access_key_id && secret_access_key && bucket_name
|
||||
require 'aws-sdk'
|
||||
s3 = AWS::S3.new(access_key_id: access_key_id,secret_access_key: secret_access_key)
|
||||
bucket = s3.buckets[bucket_name]
|
||||
files.each do |source, outputs|
|
||||
s3_objs = outputs.map do |file|
|
||||
bucket.objects[file]
|
||||
end
|
||||
s3_objs.each { |obj| obj.write(Pathname.new(source)) }
|
||||
end
|
||||
else
|
||||
puts "Not uploading any files to S3!"
|
||||
end
|
||||
end
|
||||
|
||||
task :publish do
|
||||
rev = `git rev-parse --short HEAD`.to_s.strip
|
||||
master_rev = `git rev-parse --short origin/master`.to_s.strip
|
||||
|
||||
if rev == master_rev
|
||||
files = dist_files do |basename|
|
||||
["#{basename}-latest.js", "#{basename}-#{rev}.js"]
|
||||
end
|
||||
end
|
||||
|
||||
publish_s3 files
|
||||
end
|
||||
|
||||
task :publish_version do
|
||||
tag = `git tag -l --points-at HEAD`.to_s.strip.split(/\n/)
|
||||
fail "The current commit must be tagged." if tag.empty?
|
||||
fail "Multiple tags, aborting: #{tag}" if tag.length > 1
|
||||
tag = tag.first
|
||||
|
||||
files = dist_files do |basename|
|
||||
["#{basename}-#{tag}.js"]
|
||||
end
|
||||
publish_s3 files
|
||||
end
|
||||
Reference in New Issue
Block a user