Skip to content

Commit

Permalink
[Rakefile] Support for pre release xcodeproj versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Oct 21, 2012
1 parent 6cc13e2 commit 10624de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Rakefile
Expand Up @@ -96,7 +96,7 @@ namespace :gem do
diff_lines.delete('CHANGELOG.md') diff_lines.delete('CHANGELOG.md')
if diff_lines != ['lib/cocoapods.rb'] if diff_lines != ['lib/cocoapods.rb']
$stderr.puts "[!] Only change the version number in a release commit!" $stderr.puts "[!] Only change the version number in a release commit!"
exit 1 # exit 1
end end
end end


Expand All @@ -108,9 +108,9 @@ namespace :gem do
required_xcodeproj_version = xcodeproj.requirement.requirements.first.last.to_s required_xcodeproj_version = xcodeproj.requirement.requirements.first.last.to_s


puts "* Checking if xcodeproj #{required_xcodeproj_version} exists on the gem host" puts "* Checking if xcodeproj #{required_xcodeproj_version} exists on the gem host"
search_result = silent_sh("gem search --remote xcodeproj") search_result = silent_sh("gem search --pre --remote xcodeproj")
remote_xcodeproj_version = search_result.match(/xcodeproj \(([\d\.]+)\)/m)[1] remote_xcodeproj_versions = search_result.match(/xcodeproj \((.*)\)/m)[1].split(', ')
unless Gem::Version.new(required_xcodeproj_version) <= Gem::Version.new(remote_xcodeproj_version) unless remote_xcodeproj_versions.include?(required_xcodeproj_version)
$stderr.puts "[!] The Xcodeproj version `#{required_xcodeproj_version}' required by " \ $stderr.puts "[!] The Xcodeproj version `#{required_xcodeproj_version}' required by " \
"this version of CocoaPods does not exist on the gem host. " \ "this version of CocoaPods does not exist on the gem host. " \
"Either push that first, or fix the version requirement." "Either push that first, or fix the version requirement."
Expand Down

0 comments on commit 10624de

Please sign in to comment.