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

Feature Request: remote branch name per configuration #38

Closed
cnadeau opened this issue Nov 6, 2020 · 4 comments
Closed

Feature Request: remote branch name per configuration #38

cnadeau opened this issue Nov 6, 2020 · 4 comments

Comments

@cnadeau
Copy link

cnadeau commented Nov 6, 2020

I'd like to know if it's possible to set the branch in the configuration from the Podfile to get something like:

config_cocoapods_binary_cache(
  cache_repo: {
    "default" => {
      "remote" => "git@cache_repo.git",
      "remote_branch" => "all_pods",  <<<<<<<
      "local" => "~/.cocoapods-binary-cache/prebuilt-frameworks"
    }
  },
  prebuild_config: "Debug"
)

We have an app that dictates the dependencies of 9 other internal pods. I'd love to build once from the app and be able to do something like

cd app
pod binary prebuild --push app_version
cd ../my_sub_pod 
pod binary fetch app_version 
pod install # to cleanup all unused cached pods
pod binary push my_sub_pod # update all cached pods for a specific sdk

Would it be something possible?

@trinhngocthuyen
Copy link
Contributor

Hi @cnadeau,
Currently, we do support custom cache branches. The cache branch (default as master) can be passed via the CLI of the fetch, push, and prebuild commands. For example:

bundle exec pod binary fetch cache_branch_goes_here

For more details about what options supported in the CLI, kindly pass --help to the given commands, for ex. bundle exec pod binary prebuild --help.

@cnadeau
Copy link
Author

cnadeau commented Nov 7, 2020

Thanks @trinhngocthuyen, thanks for the quick reply. This is exactly what I'm currently doing, but I would love to get it more automated

@trinhngocthuyen How would you implement that configuration it in the codebase? I might have some time to help again to get that feature in if you guide me on how you would architecture it within the project

Thanks again

@trinhngocthuyen
Copy link
Contributor

trinhngocthuyen commented Nov 14, 2020

cd app
pod binary prebuild --push app_version
cd ../my_sub_pod 
pod binary fetch app_version 
pod install # to cleanup all unused cached pods
pod binary push my_sub_pod # update all cached pods for a specific sdk

Sorry, I think I'm a little confused about the request.
Do you mean you want to prebuild & push certain frameworks, not all of them? If so, you could use the --targets option in the prebuild CLI, like this: bundle exec pod binary prebuild --targets=A,B,C

@cnadeau
Copy link
Author

cnadeau commented Feb 3, 2021

The usage would be the same pods for several projects and what I had in mind is a simplified vision of
@savage7 #62 feature request because we have several frameworks depending on each other

Root => A => B => C

and A, B and C have their own CDN dependencies

The Root cache can be used to build A, B and C for CI Unit tests validation since it contains all the required frameworks

And the --targets options seems to be the part I missed to actually prebuild a release version of the framework using the cache. Thanks again!

@cnadeau cnadeau closed this as completed Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants