Commit 75d09d5657b2bd8932c509833f5e7c4dfad3ea77
1 parent
11b8fc89
Exists in
master
and in
29 other branches
ActionItem918: better Rakefile.pkg
Showing
1 changed file
with
11 additions
and
3 deletions
Show diff stats
Rakefile.pkg
... | ... | @@ -3,15 +3,18 @@ require(File.join(File.dirname(__FILE__), 'config', 'boot')) |
3 | 3 | require 'rake' |
4 | 4 | require 'rake/testtask' |
5 | 5 | require 'rake/rdoctask' |
6 | - | |
7 | -require 'tasks/rails' | |
8 | - | |
9 | 6 | require 'rake/packagetask' |
10 | 7 | require 'noosfero' |
11 | 8 | |
12 | 9 | Rake::PackageTask.new(Noosfero::PROJECT, Noosfero::VERSION) do |p| |
13 | 10 | p.need_tar_gz = true |
14 | 11 | |
12 | + # cleaning temporary files | |
13 | + FileUtils.rm_rf('tmp') | |
14 | + FileUtils.mkdir_p('tmp/cache') | |
15 | + FileUtils.mkdir_p('tmp/sessions') | |
16 | + FileUtils.mkdir_p('tmp/sockets') | |
17 | + | |
15 | 18 | # application files |
16 | 19 | p.package_files.include('app/**/*.{rb,rhtml,rjs,rxml}') |
17 | 20 | p.package_files.include('config/**/*.{rb,sqlite3}') |
... | ... | @@ -58,3 +61,8 @@ Rake::PackageTask.new(Noosfero::PROJECT, Noosfero::VERSION) do |p| |
58 | 61 | p.package_files.exclude('public/images/[0-9][0-9][0-9][0-9]/**/*') |
59 | 62 | |
60 | 63 | end |
64 | + | |
65 | +task :default => :package | |
66 | +task :clean => :clobber_package | |
67 | + | |
68 | +# vim: ft=ruby | ... | ... |