Commit 6a5ee4498aac441b2fe4cc2d23db2f67a8a678b3
1 parent
7ba8b490
Exists in
master
and in
28 other branches
Reviewing distributed tarball
I'm wondering whether we should just generate distribute a tarball of the git repository instead of explicitly listing the files that rake should put in this tarball.
Showing
2 changed files
with
43 additions
and
8 deletions
Show diff stats
Rakefile.pkg
@@ -16,21 +16,34 @@ Rake::PackageTask.new(Noosfero::PROJECT, Noosfero::VERSION) do |p| | @@ -16,21 +16,34 @@ Rake::PackageTask.new(Noosfero::PROJECT, Noosfero::VERSION) do |p| | ||
16 | FileUtils.mkdir_p('tmp/sockets') | 16 | FileUtils.mkdir_p('tmp/sockets') |
17 | 17 | ||
18 | # application files | 18 | # application files |
19 | - p.package_files.include('app/**/*.{rb,rhtml,rjs,rxml}') | 19 | + p.package_files.include('app/**/*.{rb,rhtml,rjs,rxml,erb}') |
20 | p.package_files.include('config/**/*.{rb,sqlite3}') | 20 | p.package_files.include('config/**/*.{rb,sqlite3}') |
21 | p.package_files.include('config/ferret_server.yml.dist') | 21 | p.package_files.include('config/ferret_server.yml.dist') |
22 | p.package_files.include('db/migrate/*.rb') | 22 | p.package_files.include('db/migrate/*.rb') |
23 | p.package_files.include('db/schema.rb') | 23 | p.package_files.include('db/schema.rb') |
24 | p.package_files.include('doc/README_FOR_APP') | 24 | p.package_files.include('doc/README_FOR_APP') |
25 | p.package_files.include('lib/**/*.{rake,rb}') | 25 | p.package_files.include('lib/**/*.{rake,rb}') |
26 | - p.package_files.include('log') | ||
27 | - p.package_files.include('po/*/noosfero.po') | 26 | + p.package_files.include('Rakefile') |
27 | + p.package_files.include('Rakefile.pkg') | ||
28 | + | ||
29 | + # translation files | ||
30 | + p.package_files.include('po/*/*.po') | ||
28 | p.package_files.include('po/noosfero.pot') | 31 | p.package_files.include('po/noosfero.pot') |
32 | + | ||
33 | + # templates | ||
29 | p.package_files.include('public/designs/templates/**/*') | 34 | p.package_files.include('public/designs/templates/**/*') |
35 | + | ||
36 | + # icon sets | ||
30 | p.package_files.include('public/designs/icons/tango/**/*') | 37 | p.package_files.include('public/designs/icons/tango/**/*') |
31 | - p.package_files.include('public/designs/icons/default') | 38 | + p.package_files.exclude('public/designs/icons/tango/Tango') |
39 | + p.package_files.exclude('public/designs/icons/default') | ||
40 | + | ||
41 | + # themes | ||
32 | p.package_files.include('public/designs/themes/noosfero/**/*') | 42 | p.package_files.include('public/designs/themes/noosfero/**/*') |
33 | - p.package_files.include('public/designs/themes/default') | 43 | + p.package_files.include('public/designs/themes/base/**/*') |
44 | + p.package_files.exclude('public/designs/themes/default') | ||
45 | + | ||
46 | + # static files | ||
34 | p.package_files.include('public/dispatch.*') | 47 | p.package_files.include('public/dispatch.*') |
35 | p.package_files.include('public/favicon.ico') | 48 | p.package_files.include('public/favicon.ico') |
36 | p.package_files.include('public/*.html') | 49 | p.package_files.include('public/*.html') |
@@ -39,17 +52,28 @@ Rake::PackageTask.new(Noosfero::PROJECT, Noosfero::VERSION) do |p| | @@ -39,17 +52,28 @@ Rake::PackageTask.new(Noosfero::PROJECT, Noosfero::VERSION) do |p| | ||
39 | p.package_files.include('public/javascripts/**/*') | 52 | p.package_files.include('public/javascripts/**/*') |
40 | p.package_files.include('public/robots.txt') | 53 | p.package_files.include('public/robots.txt') |
41 | p.package_files.include('public/stylesheets/**/*') | 54 | p.package_files.include('public/stylesheets/**/*') |
42 | - p.package_files.include('Rakefile') | ||
43 | - p.package_files.include('Rakefile.pkg') | 55 | + |
56 | + # top-level docs | ||
44 | p.package_files.include('README') | 57 | p.package_files.include('README') |
45 | p.package_files.include('COPYING') | 58 | p.package_files.include('COPYING') |
46 | p.package_files.include('COPYRIGHT') | 59 | p.package_files.include('COPYRIGHT') |
60 | + p.package_files.include('INSTALL') | ||
61 | + p.package_files.include('HACKING') | ||
62 | + | ||
63 | + # scripts | ||
47 | p.package_files.include('script/**/*') | 64 | p.package_files.include('script/**/*') |
65 | + | ||
66 | + # test files | ||
48 | p.package_files.include('test/**/*.{rb,yml}') | 67 | p.package_files.include('test/**/*.{rb,yml}') |
49 | p.package_files.include('test/fixtures/files/*') | 68 | p.package_files.include('test/fixtures/files/*') |
69 | + p.package_files.include('features/**/*') | ||
70 | + p.package_files.include('config/cucumber.yml') | ||
71 | + | ||
72 | + # empty directories that must exist | ||
50 | p.package_files.include('tmp/cache') | 73 | p.package_files.include('tmp/cache') |
51 | p.package_files.include('tmp/sessions') | 74 | p.package_files.include('tmp/sessions') |
52 | p.package_files.include('tmp/sockets') | 75 | p.package_files.include('tmp/sockets') |
76 | + p.package_files.include('log') | ||
53 | 77 | ||
54 | # symbolic links | 78 | # symbolic links |
55 | p.package_files.include('app/views/profile_design/*') | 79 | p.package_files.include('app/views/profile_design/*') |
@@ -65,7 +89,7 @@ Rake::PackageTask.new(Noosfero::PROJECT, Noosfero::VERSION) do |p| | @@ -65,7 +89,7 @@ Rake::PackageTask.new(Noosfero::PROJECT, Noosfero::VERSION) do |p| | ||
65 | # online documentation | 89 | # online documentation |
66 | p.package_files.include('doc/noosfero/**/*') | 90 | p.package_files.include('doc/noosfero/**/*') |
67 | 91 | ||
68 | - # exclusions | 92 | + # do not install locally generated files |
69 | p.package_files.exclude('coverage/**/*') | 93 | p.package_files.exclude('coverage/**/*') |
70 | p.package_files.exclude('public/images/[0-9][0-9][0-9][0-9]/**/*') | 94 | p.package_files.exclude('public/images/[0-9][0-9][0-9][0-9]/**/*') |
71 | 95 |
@@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
1 | +# create the symlink to the default theme if it does not exist | ||
2 | +default = File.join(RAILS_ROOT, 'public', 'designs', 'icons', 'default') | ||
3 | +if !File.exists?(default) | ||
4 | + File.symlink('tango', default) | ||
5 | +end | ||
6 | + | ||
7 | +# create a symlink to system-wide Tango icon set if it does not exist | ||
8 | +tango_symlink = File.join(RAILS_ROOT, 'public', 'designs', 'icons', 'tango', 'Tango') | ||
9 | +if !File.exist?(tango_symlink) | ||
10 | + File.symlink('/usr/share/icons/Tango', tango_symlink) | ||
11 | +end |