Skip to content

Commit

Permalink
Merge pull request #69 from skiritsa/master
Browse files Browse the repository at this point in the history
Fix ignore configuration when we use increment_build_number or  increment_app_version in xcodeproj with target and build_configuration_name
  • Loading branch information
jdouglas-nz authored Jun 25, 2022
2 parents ec13234 + e67c2da commit 44c1929
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ def self.set_build_number_using_target(params, next_build_number)
target = project.targets[0] if target.nil?
end

target.build_configurations.each do |config|
if params[:build_configuration_name]
config = target.build_configurations.detect { |c| c.name == params[:build_configuration_name]}
UI.message "updating #{config.name} to build #{next_build_number}"
config.build_settings["CURRENT_PROJECT_VERSION"] = next_build_number
end unless target.nil?
else
target.build_configurations.each do |config|
UI.message "updating #{config.name} to build #{next_build_number}"
config.build_settings["CURRENT_PROJECT_VERSION"] = next_build_number
end unless target.nil?
end

project.save
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,17 @@ def self.set_version_number_using_target(params, next_version_number)
target = project.targets[0] if target.nil?
end

target.build_configurations.each do |config|
if params[:build_configuration_name]
config = target.build_configurations.detect { |c| c.name == params[:build_configuration_name]}
UI.message "updating #{config.name} to version #{next_version_number}"
config.build_settings["MARKETING_VERSION"] = next_version_number
end unless target.nil?
else
target.build_configurations.each do |config|
UI.message "updating #{config.name} to version #{next_version_number}"
config.build_settings["MARKETING_VERSION"] = next_version_number
end unless target.nil?
end


project.save
end
Expand Down

0 comments on commit 44c1929

Please sign in to comment.