Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 39 lines (32 sloc) 1.181 kb
5d47d9be » madrobby
2005-06-23 Added beginnings of unittest.js; cleaned up effects2.js; added packag…
1 #mostly borrowed from the rails Rakefile
2
3 require 'rake'
4
5 PKG_NAME = 'scriptaculous-js'
6 PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
7 PKG_VERSION = '1.0' + PKG_BUILD
8 PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
9 PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "dist"
10
11 desc "Default Task"
12 task :default => [ :clean, :fresh_scriptaculous, :package ]
13
14 task :clean do
15 rm_rf PKG_DESTINATION
16 end
17
18 PKG_FILES = FileList[
19 'CHANGELOG',
20 'README',
21 'MIT-LICENSE',
22 'src/dragdrop.js',
23 'src/effects2.js'
24 ]
25
26 desc "Make a ready-for-packaging distribution dir"
27 task :fresh_scriptaculous do
28 mkdir PKG_DESTINATION
29 mkdir File.join(PKG_DESTINATION, PKG_FILE_NAME)
30 mkdir File.join(PKG_DESTINATION, PKG_FILE_NAME, "src")
31 PKG_FILES.each { |file| cp_r file, File.join(PKG_DESTINATION, PKG_FILE_NAME, file) }
32 end
33
34 desc "Packages the fresh script.aculo.us scripts"
35 task :package do
36 system %{cd #{PKG_DESTINATION}; tar -czvf #{PKG_FILE_NAME}.tar.gz #{PKG_FILE_NAME}}
37 system %{cd #{PKG_DESTINATION}; zip -r #{PKG_FILE_NAME}.zip #{PKG_FILE_NAME}}
38 system %{cd #{PKG_DESTINATION}; tar -c #{PKG_FILE_NAME} | bzip2 --best > #{PKG_FILE_NAME}.tar.bz2 }
39 end
40
Something went wrong with that request. Please try again.