Class: Pod::Command::Bin

Inherits:
Pod::Command show all
Includes:
CBin::SourcesHelper, CBin::SpecFilesHelper
Defined in:
lib/cocoapods-mtxx-bin/command/bin.rb,
lib/cocoapods-mtxx-bin/command/bin/auto.rb,
lib/cocoapods-mtxx-bin/command/bin/code.rb,
lib/cocoapods-mtxx-bin/command/bin/init.rb,
lib/cocoapods-mtxx-bin/command/bin/lock.rb,
lib/cocoapods-mtxx-bin/command/bin/repo.rb,
lib/cocoapods-mtxx-bin/command/bin/spec.rb,
lib/cocoapods-mtxx-bin/command/bin/update.rb,
lib/cocoapods-mtxx-bin/command/bin/upload.rb,
lib/cocoapods-mtxx-bin/command/bin/archive.rb,
lib/cocoapods-mtxx-bin/command/bin/install.rb,
lib/cocoapods-mtxx-bin/command/bin/buildAll.rb,
lib/cocoapods-mtxx-bin/command/bin/lib/lint.rb,
lib/cocoapods-mtxx-bin/command/bin/repo/push.rb,
lib/cocoapods-mtxx-bin/command/bin/spec/lint.rb,
lib/cocoapods-mtxx-bin/command/bin/repo/update.rb,
lib/cocoapods-mtxx-bin/command/bin/spec/create.rb,
lib/cocoapods-mtxx-bin/command/bin/lock/version.rb,
lib/cocoapods-mtxx-bin/command/bin/outputSource.rb,
lib/cocoapods-mtxx-bin/command/bin/lock/spec_repo.rb,
lib/cocoapods-mtxx-bin/command/bin/lock/dependency.rb

Overview

TODO:

Create a PR to add your plugin to CocoaPods/cocoapods.org in the `plugins.json` file, once your plugin is released.

This is an example of a cocoapods plugin adding a top-level subcommand to the 'pod' command.

You can also create subcommands of existing or new commands. Say you wanted to add a subcommand to `list` to show newly deprecated pods, (e.g. `pod list deprecated`), there are a few things that would need to change.

  • move this file to `lib/pod/command/list/deprecated.rb` and update the class to exist in the the Pod::Command::List namespace

  • change this class to extend from `List` instead of `Command`. This tells the plugin system that it is a subcommand of `list`.

  • edit `lib/cocoapods_plugins.rb` to require this file

Direct Known Subclasses

Archive, Auto, BuildAll, Code, Init, Install, Lib, Lock, OutputSource, Repo, Spec, Update, Upload

Defined Under Namespace

Classes: Archive, Auto, BuildAll, Code, Init, Install, Lib, Lock, OutputSource, Repo, Spec, Update, Upload

Instance Method Summary collapse

Methods included from CBin::SpecFilesHelper

#binary_spec, #binary_spec_files, #binary_template_spec, #binary_template_spec_file, #binary_template_spec_files, #clear_binary_spec_file_if_needed, #code_spec, #code_spec_files, #create_binary_spec_file, #find_spec_file, #spec_files

Methods included from CBin::SourcesHelper

#binary_source, #code_source_list, #sources_manager, #sources_option, #valid_sources

Constructor Details

#initialize(argv) ⇒ Bin

self.description = <<-DESC.strip_heredoc

组件二进制化插件

利用源码私有源与二进制私有源实现对组件依赖类型的切换

DESC



49
50
51
52
53
54
55
56
57
58
59
# File 'lib/cocoapods-mtxx-bin/command/bin.rb', line 49

def initialize(argv)
  # !!! 下面这个require必须放在这里,不能放到文件顶部,切记 !!!
  require 'cocoapods-mtxx-bin/native'

  # @help = argv.flag?('help')
  super
  # @env = argv.option('env') || 'dev'
  # CBin.config.set_configuration_env(@env)
  # msg = "cocoapods-mtxx-bin #{CBin::VERSION} 版本 #{@env} 环境"
  # UI.info "\033[44;30m#{msg}\033[0m\n"
end