nixenvironment 0.0.56 → 0.0.57

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5d6477119296f4eeb76dfa17fb19214e31ea195
4
- data.tar.gz: c20eb76092cfaf993e719e2af3a88a028ece9e4d
3
+ metadata.gz: 17793840e6b6e3a03336761c63b7c46f29b67bbd
4
+ data.tar.gz: 09e4429d88d903cfd89b63ae6e3c55ef25a8eeca
5
5
  SHA512:
6
- metadata.gz: f568115facf5126ff4f524112067bf74855687dea805560767cd300c9073da89554deaa2d864c581e1f853c0bf2b9cd87c34960f0dda8003584ab86ce91208b4
7
- data.tar.gz: 07713cf74f1adc6ed1e624c1752ade9d5ff8cda5672bf88eb42c0da909d57a62fab6d8620aa966f16e89af79c12a3d84b93f5ccdb2e8270c43cb510cc78523b5
6
+ metadata.gz: d1889d5d0cf0779493217ae5547131a43cda3f932daf45dfdb23839d46e3a95b94450ef69efefe9fb2d53ea1685ee622718537aa701465aa0c2ce6a39434e36b
7
+ data.tar.gz: 5687c1e693878fb6990973aec2a05f08a6334017eafcfb8c07a44df6f7f480bf2fb54e36672fc092e8db6de5ebc7dcc0cf01dacaa432177ac8b9a03dac16637b
data/bin/nixenvironment CHANGED
@@ -48,9 +48,11 @@ global_option ('--bundle_id VALUE') { |value| $bundle_id = value }
48
48
  global_option ('--resigned_bundle_id VALUE') { |value| $resigned_bundle_id = value }
49
49
  global_option ('--resigned_watchkit_app_bundle_id VALUE') { |value| $resigned_watchkit_app_bundle_id = value }
50
50
  global_option ('--resigned_watchkit_extension_bundle_id VALUE') { |value| $resigned_watchkit_extension_bundle_id = value }
51
+ global_option ('--resigned_widget_bundle_id VALUE') { |value| $resigned_widget_bundle_id = value }
51
52
  global_option ('--resigned_bundle_name VALUE') { |value| $resigned_bundle_name = value }
52
53
  global_option ('--resigned_entitlements_path VALUE') { |value| $resigned_entitlements_path = value }
53
54
  global_option ('--resigned_watchkit_extension_entitlements_path VALUE') { |value| $resigned_watchkit_extension_entitlements_path = value }
55
+ global_option ('--resigned_widget_entitlements_path VALUE') { |value| $resigned_widget_entitlements_path = value }
54
56
 
55
57
  command :update do |c|
56
58
  c.syntax = 'nixenvironment update'
@@ -281,9 +283,11 @@ def read_config_settings
281
283
  update_config_settings('RESIGNED_BUNDLE_ID', $resigned_bundle_id)
282
284
  update_config_settings('RESIGNED_WATCHKIT_APP_BUNDLE_ID', $resigned_watchkit_app_bundle_id)
283
285
  update_config_settings('RESIGNED_WATCHKIT_EXTENSION_BUNDLE_ID', $resigned_watchkit_extension_bundle_id)
286
+ update_config_settings('RESIGNED_WIDGET_BUNDLE_ID', $resigned_widget_bundle_id)
284
287
  update_config_settings('RESIGNED_BUNDLE_NAME', $resigned_bundle_name)
285
288
  update_config_settings('RESIGNED_ENTITLEMENTS_PATH', $resigned_entitlements_path)
286
289
  update_config_settings('RESIGNED_WATCHKIT_EXTENSION_ENTITLEMENTS_PATH', $resigned_watchkit_extension_entitlements_path)
290
+ update_config_settings('RESIGNED_WIDGET_ENTITLEMENTS_PATH', $resigned_widget_entitlements_path)
287
291
  end
288
292
 
289
293
  def update_config_settings(key, value)
@@ -355,6 +359,7 @@ def supplement_config_settings(config)
355
359
 
356
360
  @unescaped_watchkit_extension_product_settings_path = unescaped_product_settings_path(' WatchKit Extension', config)
357
361
  @unescaped_watchkit_app_product_settings_path = unescaped_product_settings_path(' WatchKit App', config)
362
+ @unescaped_widget_product_settings_path = unescaped_product_settings_path(' Widget', config)
358
363
  else
359
364
  abort('Build error! Either PROJECT_TO_BUILD or WORKSPACE_TO_BUILD must be specified!')
360
365
  end
@@ -458,12 +463,15 @@ def save_build_env_vars
458
463
  executable_name = @config_settings['EXECUTABLE_NAME']
459
464
  watchkit_app_executable = executable_name + ' WatchKit App.app'
460
465
  watchkit_extension_executable = executable_name + ' WatchKit Extension.appex'
466
+ widget_executable = executable_name + ' Widget.appex'
461
467
 
462
468
  app_product = File.join(@config_settings['BUILT_PRODUCTS_DIR'], executable_name) + '.app'
463
469
  watchkit_extension_relative_product = @config_settings['RESIGNED_WATCHKIT_EXTENSION_BUNDLE_ID'].nil? ? nil : File.join('PlugIns', watchkit_extension_executable).shellescape
464
470
  watchkit_app_relative_product = @config_settings['RESIGNED_WATCHKIT_APP_BUNDLE_ID'].nil? ? nil : File.join(watchkit_extension_relative_product, watchkit_app_executable).shellescape
471
+ widget_relative_product = @config_settings['RESIGNED_WIDGET_BUNDLE_ID'].nil? ? nil : File.join('PlugIns', widget_executable).shellescape
465
472
 
466
473
  resigned_watchkit_extension_entitlements_path = @config_settings['RESIGNED_WATCHKIT_EXTENSION_ENTITLEMENTS_PATH'].nil? ? nil : @config_settings['RESIGNED_WATCHKIT_EXTENSION_ENTITLEMENTS_PATH'].shellescape
474
+ resigned_widget_entitlements_path = @config_settings['RESIGNED_WIDGET_ENTITLEMENTS_PATH'].nil? ? nil : @config_settings['RESIGNED_WIDGET_ENTITLEMENTS_PATH'].shellescape
467
475
 
468
476
  system("
469
477
  echo \"#!/bin/sh\
@@ -475,6 +483,7 @@ OBJECTS_NORMAL_DIR=#{@config_settings['OBJECT_FILE_DIR_normal']}
475
483
  APP_PRODUCT=#{app_product}
476
484
  WATCHKIT_APP_RELATIVE_PRODUCT=#{watchkit_app_relative_product}
477
485
  WATCHKIT_EXTENSION_RELATIVE_PRODUCT=#{watchkit_extension_relative_product}
486
+ WIDGET_RELATIVE_PRODUCT=#{widget_relative_product}
478
487
  APP_DSYM=#{app_product}.dSYM
479
488
  APP_INFOPLIST_FILE=#{@config_settings['PRODUCT_SETTINGS_PATH']}
480
489
  EMBEDDED_PROFILE=#{app_product}/#{@config_settings['EMBEDDED_PROFILE_NAME']}
@@ -484,9 +493,11 @@ APP_INFOPLIST_FILE=#{@config_settings['PRODUCT_SETTINGS_PATH']}
484
493
  RESIGNED_BUNDLE_ID=#{@config_settings['RESIGNED_BUNDLE_ID']}
485
494
  RESIGNED_WATCHKIT_APP_BUNDLE_ID=#{@config_settings['RESIGNED_WATCHKIT_APP_BUNDLE_ID']}
486
495
  RESIGNED_WATCHKIT_EXTENSION_BUNDLE_ID=#{@config_settings['RESIGNED_WATCHKIT_EXTENSION_BUNDLE_ID']}
496
+ RESIGNED_WIDGET_BUNDLE_ID=#{@config_settings['RESIGNED_WIDGET_BUNDLE_ID']}
487
497
  RESIGNED_BUNDLE_NAME=#{@config_settings['RESIGNED_BUNDLE_NAME']}
488
498
  RESIGNED_ENTITLEMENTS_PATH=#{@config_settings['RESIGNED_ENTITLEMENTS_PATH']}
489
- RESIGNED_WATCHKIT_EXTENSION_ENTITLEMENTS_PATH=#{resigned_watchkit_extension_entitlements_path}\" > _last_build_vars.sh
499
+ RESIGNED_WATCHKIT_EXTENSION_ENTITLEMENTS_PATH=#{resigned_watchkit_extension_entitlements_path}
500
+ RESIGNED_WIDGET_ENTITLEMENTS_PATH=#{resigned_widget_entitlements_path}\" > _last_build_vars.sh
490
501
  ")
491
502
  end
492
503
 
@@ -699,6 +710,15 @@ def backup_info_plist
699
710
 
700
711
  p('WatchKit Extension Info.plist was backuped.')
701
712
  end
713
+
714
+ unless @unescaped_widget_product_settings_path.nil?
715
+ p('Backuping Widget Info.plist ...')
716
+
717
+ @widget_info_plist_backup_name = @unescaped_widget_product_settings_path + '.backup'
718
+ FileUtils.cp(@unescaped_widget_product_settings_path, @widget_info_plist_backup_name)
719
+
720
+ p('Widget Info.plist was backuped.')
721
+ end
702
722
  end
703
723
 
704
724
  def update_info_plist(config)
@@ -747,6 +767,18 @@ def update_info_plist(config)
747
767
 
748
768
  p('WatchKit Extension Info.plist was updated.')
749
769
  end
770
+
771
+ unless @unescaped_widget_product_settings_path.nil?
772
+ p('Updating Widget Info.plist ...')
773
+
774
+ update_success = system("/usr/libexec/PlistBuddy -c 'Set :CFBundleVersion \"#{monotonic_revision}\"' \"#{@unescaped_widget_product_settings_path}\"")
775
+ unless update_success
776
+ restore_info_plist
777
+ abort('Update Widget Info.plist error!')
778
+ end
779
+
780
+ p('Widget Info.plist was updated.')
781
+ end
750
782
  end
751
783
 
752
784
  def restore_info_plist
@@ -774,6 +806,15 @@ def restore_info_plist
774
806
 
775
807
  p('WatchKit Extension Info.plist was restored.')
776
808
  end
809
+
810
+ unless @unescaped_widget_product_settings_path.nil?
811
+ p('Restoring Widget Info.plist ...')
812
+
813
+ File.delete(@unescaped_widget_product_settings_path)
814
+ File.rename(@widget_info_plist_backup_name, @unescaped_widget_product_settings_path)
815
+
816
+ p('Widget Info.plist was restored.')
817
+ end
777
818
  end
778
819
 
779
820
  def deploy(deliver_deploy)
@@ -1,3 +1,3 @@
1
1
  module Nixenvironment
2
- VERSION = '0.0.56'
2
+ VERSION = '0.0.57'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nixenvironment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.56
4
+ version: 0.0.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-11 00:00:00.000000000 Z
12
+ date: 2015-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cocoapods