mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-19 23:11:21 +08:00
adding :package task to the rake file
This commit is contained in:
21
Rakefile
21
Rakefile
@@ -1,4 +1,4 @@
|
||||
include FileUtils
|
||||
include FileUtils
|
||||
|
||||
task :default => [:compile, :test]
|
||||
|
||||
@@ -51,9 +51,7 @@ task :compile_scenario do
|
||||
end
|
||||
|
||||
desc 'Compile JavaScript'
|
||||
task :compile do
|
||||
Rake::Task['compile_externs'].execute 0
|
||||
Rake::Task['compile_scenario'].execute 0
|
||||
task :compile => [:compile_externs, :compile_scenario] do
|
||||
|
||||
concat = %x(cat \
|
||||
src/angular.prefix \
|
||||
@@ -88,6 +86,21 @@ task :compile do
|
||||
--js_output_file angular-minified.js)
|
||||
end
|
||||
|
||||
desc 'Create angular distribution'
|
||||
task :package => :compile do
|
||||
date = Time.now.strftime('%y%m%d_%H%M')
|
||||
sha = %x(git rev-parse HEAD)[0..7]
|
||||
filename = "angular-#{date}-#{sha}.tgz"
|
||||
|
||||
%x(tar -czf #{filename} \
|
||||
angular-debug.js \
|
||||
angular-minified.js \
|
||||
angular-scenario.js \
|
||||
css/)
|
||||
|
||||
puts "Package created: #{filename}"
|
||||
end
|
||||
|
||||
namespace :server do
|
||||
desc 'Run JsTestDriver Server'
|
||||
task :start do
|
||||
|
||||
Reference in New Issue
Block a user