Commit 1c2bea7711bc1d389f365df8dd1f4a6016b6df09
1 parent
870f10af
Exists in
master
and in
29 other branches
Don't load the environment it it's not needed
Showing
6 changed files
with
14 additions
and
9 deletions
Show diff stats
lib/noosfero/core_ext/active_record.rb
lib/tasks/env.rake
@@ -1 +0,0 @@ | @@ -1 +0,0 @@ | ||
1 | -require File.join(File.dirname(__FILE__), '../../config/environment.rb') |
lib/tasks/gettext.rake
@@ -2,8 +2,6 @@ | @@ -2,8 +2,6 @@ | ||
2 | # Added for Ruby-GetText-Package | 2 | # Added for Ruby-GetText-Package |
3 | # | 3 | # |
4 | 4 | ||
5 | -require 'noosfero' | ||
6 | - | ||
7 | makemo_stamp = 'tmp/makemo.stamp' | 5 | makemo_stamp = 'tmp/makemo.stamp' |
8 | desc "Create mo-files for L10n" | 6 | desc "Create mo-files for L10n" |
9 | task :makemo => makemo_stamp | 7 | task :makemo => makemo_stamp |
@@ -40,6 +38,8 @@ end | @@ -40,6 +38,8 @@ end | ||
40 | desc "Update pot/po files to match new version." | 38 | desc "Update pot/po files to match new version." |
41 | task :updatepo do | 39 | task :updatepo do |
42 | require 'gettext_rails/tools' | 40 | require 'gettext_rails/tools' |
41 | + require 'noosfero' | ||
42 | + | ||
43 | GetText::RubyParser::ID << '__' | 43 | GetText::RubyParser::ID << '__' |
44 | GetText::RubyParser::PLURAL_ID << 'n__' | 44 | GetText::RubyParser::PLURAL_ID << 'n__' |
45 | GetText::ActiveRecordParser.init(:use_classname => false) | 45 | GetText::ActiveRecordParser.init(:use_classname => false) |
lib/tasks/package.rake
lib/tasks/release.rake
@@ -9,7 +9,11 @@ namespace :noosfero do | @@ -9,7 +9,11 @@ namespace :noosfero do | ||
9 | end | 9 | end |
10 | end | 10 | end |
11 | 11 | ||
12 | - version = Noosfero::VERSION | 12 | + def version |
13 | + require 'noosfero' | ||
14 | + Noosfero::VERSION | ||
15 | + end | ||
16 | + | ||
13 | desc 'checks if there is already a tag for the current version' | 17 | desc 'checks if there is already a tag for the current version' |
14 | task :check_tag do | 18 | task :check_tag do |
15 | sh "git tag | grep '^#{version}$' >/dev/null" do |ok, res| | 19 | sh "git tag | grep '^#{version}$' >/dev/null" do |ok, res| |
@@ -23,9 +27,9 @@ namespace :noosfero do | @@ -23,9 +27,9 @@ namespace :noosfero do | ||
23 | desc 'checks the version of the Debian package' | 27 | desc 'checks the version of the Debian package' |
24 | task :check_debian_package do | 28 | task :check_debian_package do |
25 | debian_version = `dpkg-parsechangelog | grep Version: | cut -d ' ' -f 2`.strip | 29 | debian_version = `dpkg-parsechangelog | grep Version: | cut -d ' ' -f 2`.strip |
26 | - unless debian_version =~ /^#{Noosfero::VERSION}/ | ||
27 | - puts "Version mismatch: Debian version = #{debian_version}, Noosfero upstream version = #{Noosfero::VERSION}" | ||
28 | - puts "Run `dch -v #{Noosfero::VERSION}` to add a new changelog entry that upgrades the Debian version" | 30 | + unless debian_version =~ /^#{version}/ |
31 | + puts "Version mismatch: Debian version = #{debian_version}, Noosfero upstream version = #{version}" | ||
32 | + puts "Run `dch -v #{version}` to add a new changelog entry that upgrades the Debian version" | ||
29 | raise "Version mismatch between noosfero version and debian package version" | 33 | raise "Version mismatch between noosfero version and debian package version" |
30 | end | 34 | end |
31 | end | 35 | end |
lib/tasks/version.rake