Commit a5f1436cd95e9a52f70277c2966d598843ce58b7
1 parent
b982d5e8
Exists in
master
and in
22 other branches
Add release-related tasks to alternative Rakefile
Showing
6 changed files
with
25 additions
and
19 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | +# This Rakefile is intentionally independent from Rails to it can be used to | |
| 2 | +# handle release-related tasks without having to load the entire Rails | |
| 3 | +# environment (which is slow, requires a database connection and several other | |
| 4 | +# inconveniences). | |
| 5 | + | |
| 6 | +$: << 'lib' | |
| 7 | +require 'noosfero' | |
| 8 | +require 'noosfero/version' | |
| 9 | + | |
| 10 | +load 'lib/tasks/gettext.rake' | |
| 11 | +load 'lib/tasks/doc.rake' | |
| 12 | +load 'lib/tasks/error_messages.rake' | |
| 13 | +load 'lib/tasks/translation.rake' | |
| 14 | + | |
| 15 | +load 'lib/tasks/package.rake' | |
| 16 | +load 'lib/tasks/release.rake' | |
| 17 | + | |
| 18 | +task :default => 'noosfero:translations:compile' | ... | ... |
Rakefile.translations
| ... | ... | @@ -1,11 +0,0 @@ |
| 1 | -# This Rakefile is intentionally independent from Rails to it can be used to | |
| 2 | -# handle translations without having to load the entire Rails environment | |
| 3 | -# (which is slow, requires a database connection and several other | |
| 4 | -# inconveniences). | |
| 5 | - | |
| 6 | -$: << 'lib' | |
| 7 | -load 'lib/tasks/gettext.rake' | |
| 8 | -load 'lib/tasks/doc.rake' | |
| 9 | -load 'lib/tasks/translation.rake' | |
| 10 | - | |
| 11 | -task :default => 'noosfero:translations:compile' |
debian/rules
lib/tasks/error_messages.rake
| 1 | -templates = Dir.glob(Rails.root.join('public', '*.html.erb')) | |
| 1 | +root = Pathname(File.dirname(__FILE__)).join('../../').expand_path | |
| 2 | +templates = Dir.glob(root.join('public', '*.html.erb')) | |
| 2 | 3 | targets = [] |
| 3 | 4 | templates.each do |template| |
| 4 | 5 | target = template.gsub(/.erb$/, '') |
| ... | ... | @@ -16,6 +17,6 @@ end |
| 16 | 17 | namespace :noosfero do |
| 17 | 18 | namespace 'error-pages' do |
| 18 | 19 | desc 'Translates Noosfero error pages' |
| 19 | - task :translate => [:environment] + targets | |
| 20 | + task :translate => targets | |
| 20 | 21 | end |
| 21 | 22 | end | ... | ... |
lib/tasks/package.rake
lib/tasks/release.rake
| 1 | 1 | # encoding: UTF-8 |
| 2 | 2 | |
| 3 | -require 'noosfero/version' | |
| 4 | 3 | $version = Noosfero::VERSION |
| 5 | 4 | |
| 6 | 5 | namespace :noosfero do |
| ... | ... | @@ -132,13 +131,13 @@ EOF |
| 132 | 131 | |
| 133 | 132 | if target =~ /-test$/ |
| 134 | 133 | if new_version =~ /~rc\d+/ |
| 135 | - new_version.sub!(/\~rc([0-9]+)/) { "~rc#{$1.to_i + 1}" } | |
| 134 | + new_version.sub!(/\~rc([0-9]+).*/) { "~rc#{$1.to_i + 1}" } | |
| 136 | 135 | else |
| 137 | 136 | new_version += '~rc1' |
| 138 | 137 | end |
| 139 | 138 | else |
| 140 | - if new_version =~ /~rc\d+/ | |
| 141 | - new_version.sub!(/~rc[0-9]+/, '') | |
| 139 | + if new_version =~ /~rc\d+.*/ | |
| 140 | + new_version.sub!(/~rc[0-9]+.*/, '') | |
| 142 | 141 | else |
| 143 | 142 | components = new_version.split('.').map(&:to_i) |
| 144 | 143 | if components.size < 3 | ... | ... |