Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Lazy repo update. #533

Closed
wants to merge 1 commit into from

2 participants

Fabio Pelosin Eloy Durán
Fabio Pelosin

Prof of concept patch that allows pod install to update the repos only if needed.

I'm not sure if we should keep the no-update option.

Eloy Durán
Owner

Yup, definitely makes sense.

Fabio Pelosin

This was removed to support the comparison of the specifications checksums, it is still possible to skip the repo update using the config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 20, 2012
  1. Fabio Pelosin

    Lazy repo udpate.

    fabiopelosin authored
This page is out of date. Refresh to see the latest.
8 lib/cocoapods/command.rb
View
@@ -142,14 +142,6 @@ def verify_lockfile_exists!
raise Informative, "No `Podfile.lock' found in the current working directory, run `pod install'."
end
end
-
- def update_spec_repos_if_necessary!
- if @update_repo
- UI.section 'Updating Spec Repositories' do
- Repo.new(ARGV.new(["update"])).run
- end
- end
- end
end
end
3  lib/cocoapods/command/install.rb
View
@@ -27,7 +27,6 @@ def self.options
["--no-clean", "Leave SCM dirs like `.git' and `.svn' intact after downloading"],
["--no-doc", "Skip documentation generation with appledoc"],
["--no-integrate", "Skip integration of the Pods libraries in the Xcode project(s)"],
- ["--no-update", "Skip running `pod repo update` before install"],
].concat(super)
end
@@ -35,7 +34,6 @@ def initialize(argv)
config.clean = !argv.option('--no-clean')
config.generate_docs = !argv.option('--no-doc')
config.integrate_targets = !argv.option('--no-integrate')
- @update_repo = !argv.option('--no-update')
super unless argv.empty?
end
@@ -48,7 +46,6 @@ def run_install_with_update(update)
def run
verify_podfile_exists!
- update_spec_repos_if_necessary!
run_install_with_update(false)
end
end
8 lib/cocoapods/command/outdated.rb
View
@@ -10,21 +10,13 @@ def self.banner
spec repos, not those from local/external sources or `:head' versions.}
end
- def self.options
- [
- ["--no-update", "Skip running `pod repo update` before install"],
- ].concat(super)
- end
-
def initialize(argv)
- @update_repo = !argv.option('--no-update')
super unless argv.empty?
end
def run
verify_podfile_exists!
verify_lockfile_exists!
- update_spec_repos_if_necessary!
sandbox = Sandbox.new(config.project_pods_root)
resolver = Resolver.new(config.podfile, config.lockfile, sandbox)
1  lib/cocoapods/command/update.rb
View
@@ -12,7 +12,6 @@ def self.banner
def run
verify_podfile_exists!
verify_lockfile_exists!
- update_spec_repos_if_necessary!
run_install_with_update(true)
end
end
5 lib/cocoapods/resolver.rb
View
@@ -77,6 +77,11 @@ def resolve
end
end
end if config.verbose?
+
+ UI.section 'Updating Spec Repositories' do
+ Command::Repo.new(Command::ARGV.new(["update"])).run
+ end if !(@pods_by_state[:added] + @pods_by_state[:changed]).empty? || update_mode
+
@pods_to_lock = (lockfile.pods_names - @pods_by_state[:added] - @pods_by_state[:changed] - @pods_by_state[:removed]).uniq
end
Something went wrong with that request. Please try again.