Permalink
Browse files

update MapBox podspecs for 0.16/0.17 compatibility

  • Loading branch information...
1 parent 4f2a96f commit abb95c1ec71dc5b255c7736ebc0a345a66cdbbe3 @incanus incanus committed Apr 2, 2013
@@ -26,7 +26,12 @@ Pod::Spec.new do |m|
raise ::Pod::Informative, "Failed to generate MapBox resources bundle"
end
end
- File.open(File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name), 'a') do |file|
+ if Version.new(Pod::VERSION) >= Version.new('0.17.0')
+ script_path = target_installer.copy_resources_script_path
+ else
+ script_path = File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name)
+ end
+ File.open(script_path, 'a') do |file|
file.puts "install_resource 'Resources/MapBox.bundle'"
end
end
@@ -26,7 +26,12 @@ Pod::Spec.new do |m|
raise ::Pod::Informative, "Failed to generate MapBox resources bundle"
end
end
- File.open(File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name), 'a') do |file|
+ if Version.new(Pod::VERSION) >= Version.new('0.17.0')
+ script_path = target_installer.copy_resources_script_path
+ else
+ script_path = File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name)
+ end
+ File.open(script_path, 'a') do |file|
file.puts "install_resource 'Resources/MapBox.bundle'"
end
end
@@ -26,7 +26,12 @@ Pod::Spec.new do |m|
raise ::Pod::Informative, "Failed to generate MapBox resources bundle"
end
end
- File.open(File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name), 'a') do |file|
+ if Version.new(Pod::VERSION) >= Version.new('0.17.0')
+ script_path = target_installer.copy_resources_script_path
+ else
+ script_path = File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name)
+ end
+ File.open(script_path, 'a') do |file|
file.puts "install_resource 'Resources/MapBox.bundle'"
end
end
@@ -28,7 +28,12 @@ Pod::Spec.new do |m|
raise ::Pod::Informative, "Failed to generate MapBox resources bundle"
end
end
- File.open(File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name), 'a') do |file|
+ if Version.new(Pod::VERSION) >= Version.new('0.17.0')
+ script_path = target_installer.copy_resources_script_path
+ else
+ script_path = File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name)
+ end
+ File.open(script_path, 'a') do |file|
file.puts "install_resource 'Resources/MapBox.bundle'"
end
end
@@ -28,7 +28,12 @@ Pod::Spec.new do |m|
raise ::Pod::Informative, "Failed to generate MapBox resources bundle"
end
end
- File.open(File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name), 'a') do |file|
+ if Version.new(Pod::VERSION) >= Version.new('0.17.0')
+ script_path = target_installer.copy_resources_script_path
+ else
+ script_path = File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name)
+ end
+ File.open(script_path, 'a') do |file|
file.puts "install_resource 'Resources/MapBox.bundle'"
end
end
@@ -28,7 +28,12 @@ Pod::Spec.new do |m|
raise ::Pod::Informative, "Failed to generate MapBox resources bundle"
end
end
- File.open(File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name), 'a') do |file|
+ if Version.new(Pod::VERSION) >= Version.new('0.17.0')
+ script_path = target_installer.copy_resources_script_path
+ else
+ script_path = File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name)
+ end
+ File.open(script_path, 'a') do |file|
file.puts "install_resource 'Resources/MapBox.bundle'"
end
end

0 comments on commit abb95c1

Please sign in to comment.