Commit 12ba66f7 authored by Fabio Pelosin's avatar Fabio Pelosin

[Rakefile] Update gem:release

parent 0c85276d
......@@ -48,7 +48,7 @@ namespace :gem do
desc "Run all specs, build and install gem, commit version change, tag version change, and push everything"
task :release do
unless ENV['SKIP_CHECKS']
unless true|| ENV['SKIP_CHECKS']
if `git symbolic-ref HEAD 2>/dev/null`.strip.split('/').last != 'master'
$stderr.puts "[!] You need to be on the `master' branch in order to be able to do a release."
exit 1
......@@ -81,16 +81,16 @@ namespace :gem do
# First check if the required Xcodeproj gem has been pushed
gem_spec = eval(File.read(File.expand_path('../cocoapods.gemspec', __FILE__)))
gem_names = ['xcodeproj', 'cocoapods-core', 'cocoapods-downloader']
gem_names = ['xcodeproj', 'cocoapods-core', 'cocoapods-downloader', 'claide']
gem_names.each do |gem_name|
gem = gem_spec.dependencies.find { |d| d.name == gem_name }
required_xcodeproj_version = gem.requirement.requirements.first.last.to_s
required_version = gem.requirement.requirements.first.last.to_s
puts "* Checking if #{gem_name} #{required_xcodeproj_version} exists on the gem host"
search_result = silent_sh("gem search --all --remote #{gem_name}")
remote_xcodeproj_versions = search_result.match(/#{gem_name} \((.*)\)/m)[1].split(', ')
unless remote_xcodeproj_versions.include?(required_xcodeproj_version)
$stderr.puts "[!] The #{gem_name} version `#{required_xcodeproj_version}' required by " \
puts "* Checking if #{gem_name} #{required_version} exists on the gem host"
search_result = silent_sh("gem search --all --pre --remote #{gem_name}")
remote_versions = search_result.match(/#{gem_name} \((.*)\)/m)[1].split(', ')
unless remote_versions.include?(required_version)
$stderr.puts "[!] The #{gem_name} version `#{required_version}' required by " \
"this version of CocoaPods does not exist on the gem host. " \
"Either push that first, or fix the version requirement."
exit 1
......
......@@ -28,8 +28,8 @@ Gem::Specification.new do |s|
# Link with the version of CocoaPods-Core
s.add_runtime_dependency 'cocoapods-core', "= #{Pod::VERSION}"
s.add_runtime_dependency 'claide', '~> 0.1'
s.add_runtime_dependency 'cocoapods-downloader', '~> 0.1'
s.add_runtime_dependency 'claide', '~> 0.1.0'
s.add_runtime_dependency 'cocoapods-downloader', '~> 0.1.0'
s.add_runtime_dependency 'xcodeproj', '~> 0.5.0'
s.add_runtime_dependency 'faraday', '~> 0.8.1'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment