Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increment at the project instead of the target level. #72

Open
lhunath opened this issue May 20, 2022 · 6 comments
Open

Increment at the project instead of the target level. #72

lhunath opened this issue May 20, 2022 · 6 comments

Comments

@lhunath
Copy link

lhunath commented May 20, 2022

It would be great if we could make increment_build_number_in_xcodeproj and increment_version_number_in_xcodeproj modify the CURRENT_PROJECT_VERSION and MARKETING_VERSION values at the project level instead of at an individual target level.

This is especially useful when you are releasing an application that includes multiple targets:

  • an application with an extension
  • an application with many frameworks

In my scenario, our application currently has 16 framework targets. I do not want to manually specify the exact same version information for all targets - instead I would prefer to define this information at the shared project level and let it be inherited by all project targets.

It is very rare in my opinion that you would actually genuinely want your CURRENT_PROJECT_VERSION to be set at a target-level.

@jdouglas-nz
Copy link
Collaborator

Hey @lhunath. That's not a bad idea! I'll have a play with this and see what I can do 👌

@carmelogallo-foodics
Copy link

Hi @jdouglas-nz! Any news on this?

@chickdan
Copy link

chickdan commented Dec 12, 2022

I concur with this request! We have targets for our primary application, Watch, App Clips, Widgets, etc, and currently use the standard increment_version lane but it doesn't sync with the $(MARKETING_VERSION) hence us looking into this plugin. Thank you!

@marcpalmer
Copy link

I also expected it to work like this. Having to duplicate the increment_build_number_in_xcodeproj for every target seems crazy, as well as error-prone in case there's ever an issue where one target gets out of sync.

@marcpalmer
Copy link

On a quick scan it actually looks like it should be doing this:

def self.set_all_xcodeproj_build_numbers(params, next_build_number)

...but if at first if I didn't pass a target in to the action, I got an error in the Ruby code around a split issue. Seems like my pre-existing project needed the "first time edit of version" somewhere to trigger it to be correct... now I can remove the target: arg from increment_build_number_in_xcodeproj and it is updating them all it seems.

@lhunath
Copy link
Author

lhunath commented Jan 2, 2023

now I can remove the target: arg from increment_build_number_in_xcodeproj and it is updating them all it seems.

Are you saying that omitting target: is causing the plugin to set each target's individual build number or it's causing the plugin to set the build number at the project level? The goal for this issue is the latter, not the former.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants