diff --git a/Instabug.podspec b/Instabug.podspec index fd7de06a..995dddf9 100644 --- a/Instabug.podspec +++ b/Instabug.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Instabug" - s.version = "3.4.4" + s.version = "3.4.5" s.summary = "Bug reporting for mobile apps. Learn more at http://instabug.com" s.homepage = "http://instabug.com" s.license = { @@ -23,7 +23,7 @@ Pod::Spec.new do |s| } s.author = { "Instabug" => "contactus@instabug.com" } s.platform = :ios, '5.0' - s.source = { :git => "https://github.com/Instabug/Instabug-iOS.git", :tag => "3.4.4" } + s.source = { :git => "https://github.com/Instabug/Instabug-iOS.git", :tag => "3.4.5" } s.source_files = 'Instabug.framework/Versions/A/Headers/*.{h}' s.resources = 'Instabug.bundle' s.preserve_paths = 'Instabug.framework/*', 'Instabug.bundle' diff --git a/add_instabug_build_script.rb b/add_instabug_build_script.rb index b42da82f..88f8d5d5 100644 --- a/add_instabug_build_script.rb +++ b/add_instabug_build_script.rb @@ -10,21 +10,21 @@ fi source "${SCRIPT_SRC}" SCRIPTEND -current_dir = Dir.pwd -while true - Dir.chdir("..") - if current_dir != Dir.pwd - current_dir = Dir.pwd - else - break - end + +current_dir = nil +while current_dir != Dir.pwd project_path = Dir.glob("#{current_dir}/*.xcodeproj") + unless project_path.first.nil? project = Xcodeproj::Project.open(project_path.first) main_target = project.targets.first - phase = main_target.new_shell_script_build_phase(INSTABUG_PHASE_NAME) + phase = main_target.shell_script_build_phases.select{ |bp| bp.name == INSTABUG_PHASE_NAME }.first || main_target.new_shell_script_build_phase(INSTABUG_PHASE_NAME) + phase.shell_path = "/bin/sh" phase.shell_script = INSTABUG_PHASE_SCRIPT project.save() break end + + Dir.chdir("..") + current_dir = Dir.pwd end