Class: Commands::VerifyProvision
- Inherits:
-
Object
- Object
- Commands::VerifyProvision
- Defined in:
- lib/commands/verify_provision.rb
Instance Method Summary collapse
-
#options ⇒ Object
holds the options that were passed you can set any initial defaults here.
- #register(opts, global_options) ⇒ Object
-
#required_options ⇒ Object
required options.
-
#run(global_options) ⇒ Object
Getting a plist returned from a mobile provsion file: security cms -D -i eBay_Core_iPad_Enterprise.mobileprovision f=File.open(“appstore.xcconfig”, ‘w’).readlines f.write(f).
Instance Method Details
#options ⇒ Object
holds the options that were passed you can set any initial defaults here
14 15 16 17 |
# File 'lib/commands/verify_provision.rb', line 14 def @options ||= { } end |
#register(opts, global_options) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/commands/verify_provision.rb', line 25 def register(opts, ) opts. = "Usage: update_plist" opts.description = "Updates the specified plist." opts.on('-c', "--config name", "Required - Name of the config we are building from.") do |v| [:config] = v end opts.on('-b', "--branch config branch name", "Use build config branch") do |v| [:branch] = v end opts.on('-v', "--verbose", "Display passed data") do |v| [:verbose] = true end end |
#required_options ⇒ Object
required options
20 21 22 23 |
# File 'lib/commands/verify_provision.rb', line 20 def @required_options ||= Set.new [ :config, ] end |
#run(global_options) ⇒ Object
Getting a plist returned from a mobile provsion file: security cms -D -i eBay_Core_iPad_Enterprise.mobileprovision f=File.open(“appstore.xcconfig”, ‘w’).readlines f.write(f)
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/commands/verify_provision.rb', line 47 def run() config_name = [:config] verbose = [:verbose] config_branch = [:branch] config_repo_url = EcbSharedLib.prepare_config_repo(config_branch) path_to_provisions = EcbSharedLib.path_to_provision_files(config_repo_url, config_name) Dir.glob('*.mobileprovision').each do |f| cmd = "security cms -D -i #{f}" provision_data = EcbSharedLib::CL.do_cmd_output(cmd, path_to_provisions) plist_data = Plist::parse_xml(provision_data) puts plist_data["UUID"] end end |