Skip to content

Commit

Permalink
[Rakefile] Fix release task
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Sep 4, 2013
1 parent fd6f216 commit 39fe4ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ end

namespace :gem do
def gem_version
require File.expand_path('../lib/xcodeproj', __FILE__)
require File.expand_path('../lib/xcodeproj/gem_version', __FILE__)
Xcodeproj::VERSION
end

Expand Down Expand Up @@ -87,8 +87,9 @@ namespace :gem do
exit 1
end

if !diff_lines.all? { |f| %w{ Gemfile.lock lib/xcodeproj.rb }.include?(f) }
$stderr.puts "[!] Only change the version number in a release commit!"
not_allowed_files = diff_lines - ['CHANGELOG.md', 'lib/xcodeproj/gem_version.rb', 'Gemfile.lock']
unless not_allowed_files.empty?
$stderr.puts "[!] Only change the version number in a release commit! `#{not_allowed_files}`"
exit 1
end
end
Expand Down

0 comments on commit 39fe4ce

Please sign in to comment.