mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
adding :package task to the rake file
This commit is contained in:
parent
7ed2191b07
commit
fbfd160316
1 changed files with 17 additions and 4 deletions
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue