Sha256: 0c1955fd2d9e6b2d1b066d727b1897394a21b9ad2cd2912f57ec502e74471a52

Contents?: true

Size: 992 Bytes

Versions: 30

Compression:

Stored size: 992 Bytes

Contents

require 'pod_builder/core'

module PodBuilder
  module Command
    class SyncPodfile
      def self.call
        Configuration.check_inited
        PodBuilder::prepare_basepath
        
        install_update_repo = OPTIONS.fetch(:update_repos, true)
        installer, analyzer = Analyze.installer_at(PodBuilder::basepath, install_update_repo)

        all_buildable_items = Analyze.podfile_items(installer, analyzer)

        Dir.chdir(PodBuilder::project_path)

        previous_podfile_content = File.read("Podfile")
        Podfile::write_prebuilt(all_buildable_items, analyzer)        
        updated_podfile_content = File.read("Podfile")

        Licenses::write([], all_buildable_items)

        if previous_podfile_content != updated_podfile_content
          bundler_prefix = Configuration.use_bundler ? "bundle exec " : ""
          system("#{bundler_prefix}pod install;")
        end
        
        puts "\n\nšŸŽ‰ done!\n".green
        return 0
      end
    end
  end
end
  

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
pod-builder-3.2.0 lib/pod_builder/command/sync_podfile.rb
pod-builder-3.1.0 lib/pod_builder/command/sync_podfile.rb
pod-builder-3.0.1 lib/pod_builder/command/sync_podfile.rb
pod-builder-3.0.0 lib/pod_builder/command/sync_podfile.rb
pod-builder-y-2.3.1 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.3.0 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.2.1 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.2.0 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.1.1 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.1.0 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.0.0 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.0.0.beta.39 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.0.0.beta.38 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.0.0.beta.37 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.0.0.beta.36 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.0.0.beta.35 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.0.0.beta.34 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.0.0.beta.33 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.0.0.beta.32 lib/pod_builder/command/sync_podfile.rb
pod-builder-2.0.0.beta.31 lib/pod_builder/command/sync_podfile.rb