Open warmfusion opened 7 years ago
Aptly::Repository.get('foobar').published_in.each(&:update!)
does that, no?
Ah, quite possibly, however there is still the case of needing/wanting to access a named repo directly?
Published repositories have no name, Repositories/Snapshots/etc have. Which is what the snippet I posted does.
Aptly::Repository.get('foobar')
gets the repo by name.published_in
gets all published repositories this repo appears inSo, even if we built a Aptly::PublishedRepository.by_repo_name('foobar')
helper that'd internally still call that snippet I posted.
I think this ultimately is just a question how you think about it, and I appreciate that it seems a bit counter-intuitive how Aptly does it.
@shadeslayer what's your stance on this?
@apachelogger IMO if there's more demand for such a call, or Aptly's API starts supporting this, then it might make sense to implement it.
I've been using the API to publish to local repositories, but have found that I need to trigger an
update
on the published repositories that those locals are incorporated into.Unfortunatly, there isn't a Aptly::PublishedRepository.get( name ) method which means, while I know the name of the published repository, I need to instead use the following iterator to find any published repositories using my LocalRepo as a source;