SiarheiFedartsou / fastlane-plugin-versioning

Extends fastlane versioning actions. Allows to set/get versions without using agvtool and do some other small tricks.
MIT License
509 stars 61 forks source link

target ignored in increment_version_number_in_xcodeproj #62

Open benomatis opened 3 years ago

benomatis commented 3 years ago

I have 2 targets, and I only would like one of them to be changed, so I set the target option on increment_version_number_in_xcodeproj but it appears to be ignored, my other target is still updated.

jdouglas-nz commented 1 month ago

hey @benomatis , not sure if this is still an issue for you or not, but was wondering whether you'd be able to provide some more context as to your use-case (i.e. a simplified project), or potentially if there is a spec unit test in this repo that doesn't do what it should

benomatis commented 1 month ago

@jdouglas-nz I accepted the fact it does what it does, but I can easily imagine it's because of both targets having the same bunlde ID / name and stuff (both use the same variables in their Info.plist) file, otherwise one is my default, and the other my UITest target.

This is what I have in the Fastfile:


platform :ios do
  desc "Push a new internal testing build to TestFlight"
  target = "TrainingLaneMobile"
  lane :deploy do |options|
    is_prod = options[:env] == "production"
    ENV['ENVFILE'] = is_prod ? '.env.production' : '.env.staging'
    ios_path = "ios/" + target
    xcodeproj = ios_path + ".xcodeproj"
    increment_version_number_in_xcodeproj(
      version_number: $version_number,
      xcodeproj: xcodeproj,
      target: target
    )