sigh 1.9.0 → 1.10.0

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: c8c93a0e5c801a079a07a5a326116afaa05ea2bc
4
- data.tar.gz: 4cfe60d72c538349e7de40cd240250256f662ab3
3
+ metadata.gz: db89e0313b7e7113969f6c37d6877274cf49cd5c
4
+ data.tar.gz: 35a9e4ed144e9a5aee3aa41256b80da90b0a17a9
5
5
  SHA512:
6
- metadata.gz: 4ba497d825600cb7d09e66035f9174a609982e361eb233eb91b9bc2064b9e72b78510f62bcc90f8c1ce72c4b21518ca00b15d4935d6bd3da31b6aa6830ef0af8
7
- data.tar.gz: e5dafb86dadf2f85a1eb5ed47b0b82cc50e4985986b79655392c2a428e3fe79baa99b1db91cb95ae4ad51b3297b862597a370d7d8d7b99a38f7d1f21d2687c12
6
+ metadata.gz: 348f22c4b52117fa63b51bf51fedd20ecb91bae31e7a6b0671df2ad5b0e1cc055e768f7ea15df1dcfef5025d7422fa35d377b9200758b7ef8573ac8a4b6a42e0
7
+ data.tar.gz: 2501453961c2dd705585cbf820d764739d5579512ccdc1d893b9e208b02a81dabb463efb4806e023ab77b7fb911959c63558f9646d056b2d8ebf3ccb25bcbbec
data/lib/assets/resign.sh CHANGED
@@ -94,6 +94,7 @@ usage() {
94
94
  echo -e "\t\t[--short-version shortVersion]" >&2
95
95
  echo -e "\t\t[--bundle-version bundleVersion]" >&2
96
96
  echo -e "\t\t[-b|--bundle-id bundleId]" >&2
97
+ echo -e "\t\t[--use-app-entitlements]" >&2
97
98
  echo -e "\t\toutputIpa" >&2
98
99
  echo "Usage: $(basename $0) -h|--help" >&2
99
100
  echo "Options:" >&2
@@ -124,6 +125,9 @@ usage() {
124
125
  echo -e "\t\t\t\t\t\t\tCan't use together with '-n, --version-number' option." >&2
125
126
  echo -e "\t-b, --bundle-id bundleId\t\tSpecify new bundle identifier (CFBundleIdentifier)." >&2
126
127
  echo -e "\t\t\t\t\t\t\tWarning: will NOT apply for nested apps and extensions." >&2
128
+ echo -e "\t --use-app-entitlements\t\tExtract app bundle codesigning entitlements and combine with entitlements from new provisionin profile." >&2
129
+ echo -e "\t\t\t\t\t\t\tCan't use together with '-e, --entitlements' option." >&2
130
+ echo -e "\t--keychain-path path\t\t\tSpecify the path to a keychain that /usr/bin/codesign should use." >&2
127
131
  echo -e "\t-v, --verbose\t\t\t\tVerbose output." >&2
128
132
  echo -e "\t-h, --help\t\t\t\tDisplay help message." >&2
129
133
  exit 2
@@ -142,10 +146,13 @@ KEYCHAIN=""
142
146
  VERSION_NUMBER=""
143
147
  SHORT_VERSION=
144
148
  BUNDLE_VERSION=
149
+ KEYCHAIN_PATH=
145
150
  RAW_PROVISIONS=()
146
151
  PROVISIONS_BY_ID=()
147
152
  DEFAULT_PROVISION=""
148
153
  TEMP_DIR="_floatsignTemp"
154
+ USE_APP_ENTITLEMENTS=""
155
+
149
156
  # List of plist keys used for reference to and from nested apps and extensions
150
157
  NESTED_APP_REFERENCE_KEYS=(":WKCompanionAppBundleIdentifier" ":NSExtension:NSExtensionAttributes:WKAppBundleIdentifier")
151
158
 
@@ -187,6 +194,14 @@ while [ "$1" != "" ]; do
187
194
  shift
188
195
  BUNDLE_VERSION="$1"
189
196
  ;;
197
+ --use-app-entitlements )
198
+ shift
199
+ USE_APP_ENTITLEMENTS="YES"
200
+ ;;
201
+ --keychain-path )
202
+ shift
203
+ KEYCHAIN_PATH="$1"
204
+ ;;
190
205
  -v | --verbose )
191
206
  VERBOSE="--verbose"
192
207
  ;;
@@ -203,6 +218,12 @@ while [ "$1" != "" ]; do
203
218
  shift
204
219
  done
205
220
 
221
+ KEYCHAIN_FLAG=
222
+ if [ -n "$KEYCHAIN_PATH" ]
223
+ then
224
+ KEYCHAIN_FLAG="--keychain $KEYCHAIN_PATH"
225
+ fi
226
+
206
227
  # Log the options
207
228
  for provision in ${RAW_PROVISIONS[@]}; do
208
229
  if [[ "$provision" =~ .+=.+ ]]; then
@@ -221,11 +242,16 @@ log "Certificate: '$CERTIFICATE'"
221
242
  [[ -n "${VERSION_NUMBER}" ]] && log "Specified version number to use: '$VERSION_NUMBER'"
222
243
  [[ -n "${SHORT_VERSION}" ]] && log "Specified short version to use: '$SHORT_VERSION'"
223
244
  [[ -n "${BUNDLE_VERSION}" ]] && log "Specified bundle version to use: '$BUNDLE_VERSION'"
245
+ [[ -n "${KEYCHAIN_FLAG}" ]] && log "Specified keychain to use: '$KEYCHAIN_PATH'"
224
246
  [[ -n "${NEW_FILE}" ]] && log "Output file name: '$NEW_FILE'"
247
+ [[ -n "${USE_APP_ENTITLEMENTS}" ]] && log "Extract app entitlements: YES"
225
248
 
226
249
  # Check that version number option is not clashing with short or bundle version options
227
250
  [[ -n "$VERSION_NUMBER" && (-n "$SHORT_VERSION" || -n "$BUNDLE_VERSION") ]] && error "versionNumber option cannot be used in combination with shortVersion or bundleVersion options"
228
251
 
252
+ # Check that --use-app-entitlements and -e, --entitlements are not used at the same time
253
+ [[ -n "${USE_APP_ENTITLEMENTS}" && -n ${ENTITLEMENTS} ]] && error "--use-app-entitlements option cannot be used in combination with -e, --entitlements option."
254
+
229
255
  # Check output file name
230
256
  if [ -z "$NEW_FILE" ];
231
257
  then
@@ -376,6 +402,9 @@ function resign {
376
402
  error "Expected file does not exist: '$APP_PATH/Info.plist'"
377
403
  fi
378
404
 
405
+ # Make a copy of old Info.plist, it will come handy later to extract some old values
406
+ cp -f "$APP_PATH/Info.plist" "$TEMP_DIR/oldInfo.plist"
407
+
379
408
  # Read in current values from the app
380
409
  local CURRENT_NAME=`PlistBuddy -c "Print :CFBundleDisplayName" "$APP_PATH/Info.plist"`
381
410
  local CURRENT_BUNDLE_IDENTIFIER=`PlistBuddy -c "Print :CFBundleIdentifier" "$APP_PATH/Info.plist"`
@@ -459,8 +488,11 @@ function resign {
459
488
  log "Profile team identifier is '$TEAM_IDENTIFIER'"
460
489
  fi
461
490
 
462
- cp "$NEW_PROVISION" "$APP_PATH/embedded.mobileprovision"
491
+ # Make a copy of old embedded provisioning profile for futher use
492
+ cp -f "$APP_PATH/embedded.mobileprovision" "$TEMP_DIR/old-embedded.mobileprovision"
463
493
 
494
+ # Replace embedded provisioning profile with new file
495
+ cp -f "$NEW_PROVISION" "$APP_PATH/embedded.mobileprovision"
464
496
 
465
497
  #if the current bundle identifier is different from the new one in the provisioning profile, then change it.
466
498
  if [ "$CURRENT_BUNDLE_IDENTIFIER" != "$BUNDLE_IDENTIFIER" ];
@@ -514,7 +546,7 @@ function resign {
514
546
  do
515
547
  if [[ "$framework" == *.framework || "$framework" == *.dylib ]]
516
548
  then
517
- /usr/bin/codesign ${VERBOSE} -f -s "$CERTIFICATE" "$framework"
549
+ /usr/bin/codesign ${VERBOSE} ${KEYCHAIN_FLAG} -f -s "$CERTIFICATE" "$framework"
518
550
  checkStatus
519
551
  else
520
552
  log "Ignoring non-framework: $framework"
@@ -572,9 +604,121 @@ function resign {
572
604
 
573
605
  log "Resigning application using certificate: '$CERTIFICATE'"
574
606
  log "and entitlements: $ENTITLEMENTS"
575
- cp -- "$ENTITLEMENTS" "$APP_PATH/archived-expanded-entitlements.xcent"
607
+ cp -f "$ENTITLEMENTS" "$APP_PATH/archived-expanded-entitlements.xcent"
576
608
  /usr/bin/codesign ${VERBOSE} -f -s "$CERTIFICATE" --entitlements "$ENTITLEMENTS" "$APP_PATH"
577
609
  checkStatus
610
+ elif [[ -n "${USE_APP_ENTITLEMENTS}" ]];
611
+ then
612
+ # Extract entitlements from provisioning profile and from the app binary
613
+ # then combine them together
614
+
615
+ log "Extracting entitlements from provisioning profile"
616
+ PROFILE_ENTITLEMENTS="$TEMP_DIR/profileEntitlements"
617
+ PlistBuddy -x -c "Print Entitlements" "$TEMP_DIR/profile.plist" > "$PROFILE_ENTITLEMENTS"
618
+ checkStatus
619
+
620
+ log "Extracting entitlements from the app"
621
+ APP_ENTITLEMENTS="$TEMP_DIR/appEntitlements"
622
+ /usr/bin/codesign -d --entitlements :"$APP_ENTITLEMENTS" "$APP_PATH"
623
+ checkStatus
624
+
625
+ log "\nApp entitlements for ${APP_PATH}:"
626
+ log "$(cat "$APP_ENTITLEMENTS")"
627
+
628
+ log "Patching profile entitlements with values from app entitlements"
629
+ PATCHED_ENTITLEMENTS="$TEMP_DIR/patchedEntitlements"
630
+ # Start with using what comes in provisioning profile entitlements before patching
631
+ cp -f "$PROFILE_ENTITLEMENTS" "$PATCHED_ENTITLEMENTS"
632
+
633
+ # Get the old and new app identifier (prefix)
634
+ APP_ID_KEY="application-identifier"
635
+ # Extract just the identifier from the value
636
+ # Use the fact that we are after some identifer, which is always at the start of the string
637
+ OLD_APP_ID=$(PlistBuddy -c "Print $APP_ID_KEY" "$APP_ENTITLEMENTS" | grep -E '^[A-Z0-9]*' -o | tr -d '\n')
638
+ NEW_APP_ID=$(PlistBuddy -c "Print $APP_ID_KEY" "$PROFILE_ENTITLEMENTS" | grep -E '^[A-Z0-9]*' -o | tr -d '\n')
639
+
640
+ # Get the old and the new team ID
641
+ # Old team ID is not part of app entitlements, have to get it from old embedded provisioning profile
642
+ security cms -D -i "$TEMP_DIR/old-embedded.mobileprovision" > "$TEMP_DIR/old-embedded-profile.plist"
643
+ OLD_TEAM_ID=$(PlistBuddy -c "Print :TeamIdentifier:0" "$TEMP_DIR/old-embedded-profile.plist")
644
+ # New team ID is part of profile entitlements
645
+ NEW_TEAM_ID=$(PlistBuddy -c "Print com.apple.developer.team-identifier" "$PROFILE_ENTITLEMENTS" | grep -E '^[A-Z0-9]*' -o | tr -d '\n')
646
+
647
+ # List of rules for transferring entitlements from app to profile plist
648
+ # The format for each enty is "KEY[|ID_TYPE]"
649
+ # Where KEY is the plist key, e.g. "keychain-access-groups"
650
+ # and ID_TYPE is optional part separated by '|' that specifies what value to patch:
651
+ # TEAM_ID - patch the TeamIdentifierPrefix
652
+ # APP_ID - patch the AppIdentifierPrefix
653
+ # Patching means replacing old value from app entitlements with new value from provisioning profile
654
+ # For example, for KEY=keychain-access-groups the ID_TYPE=APP_ID
655
+ # Which means that old app ID prefix in keychain-access-groups will be replaced with new app ID prefix
656
+ # There can be only one ID_TYPE specified
657
+ # If entitlements use more than one ID type for single entitlement, then this way of resigning will not work
658
+ # instead an entitlements file must be provided explicitly
659
+ ENTITLEMENTS_TRANSFER_RULES=("com.apple.developer.associated-domains" \
660
+ "com.apple.developer.healthkit" \
661
+ "com.apple.developer.homekit" \
662
+ "com.apple.developer.icloud-container-identifiers" \
663
+ "com.apple.developer.icloud-services" \
664
+ "com.apple.developer.in-app-payments" \
665
+ "com.apple.developer.networking.vpn.api" \
666
+ "com.apple.developer.ubiquity-container-identifiers" \
667
+ "com.apple.developer.ubiquity-kvstore-identifier|TEAM_ID" \
668
+ "com.apple.external-accessory.wireless-configuration" \
669
+ "com.apple.security.application-groups" \
670
+ "inter-app-audio" \
671
+ "keychain-access-groups|APP_ID")
672
+
673
+ # Loop over all the entitlement keys that need to be transferred from app entitlements
674
+ for RULE in ${ENTITLEMENTS_TRANSFER_RULES[@]}; do
675
+ KEY=$(echo $RULE | cut -d'|' -f1)
676
+ ID_TYPE=$(echo $RULE | cut -d'|' -f2)
677
+
678
+ # Get the entry from app's entitlements
679
+ # Read it with PlistBuddy as XML, then strip the header and <plist></plist> part
680
+ ENTITLEMENTS_VALUE="$(PlistBuddy -x -c "Print $KEY" "$APP_ENTITLEMENTS" 2>/dev/null | sed -e 's,.*<plist[^>]*>\(.*\)</plist>,\1,g')"
681
+ if [[ -z "$ENTITLEMENTS_VALUE" ]]; then
682
+ log "No value for '$KEY'"
683
+ continue
684
+ fi
685
+
686
+ log "App entitlements value for key '$KEY':"
687
+ log "$ENTITLEMENTS_VALUE"
688
+
689
+ # Remove the entry for current key from profisioning profile entitlements (if exists)
690
+ PlistBuddy -c "Delete $KEY" "$PATCHED_ENTITLEMENTS" 2>/dev/null
691
+
692
+ # Add new entry to patched entitlements
693
+ plutil -insert "$KEY" -xml "$ENTITLEMENTS_VALUE" "$PATCHED_ENTITLEMENTS"
694
+
695
+ # Patch the ID value if specified
696
+ if [[ "$ID_TYPE" == "APP_ID" ]]; then
697
+ # Replace old value with new value in patched entitlements
698
+ log "Replacing old app identifier prefix '$OLD_APP_ID' with new value '$NEW_APP_ID'"
699
+ sed -i .bak "s/$OLD_APP_ID/$NEW_APP_ID/g" "$PATCHED_ENTITLEMENTS"
700
+ elif [[ "$ID_TYPE" == "TEAM_ID" ]]; then
701
+ # Replace new team identifier with new value
702
+ log "Replacing old team ID '$OLD_TEAM_ID' with new team ID: '$NEW_TEAM_ID'"
703
+ sed -i .bak "s/$OLD_TEAM_ID/$NEW_TEAM_ID/g" "$PATCHED_ENTITLEMENTS"
704
+ else
705
+ continue
706
+ fi
707
+ done
708
+
709
+ # Replace old bundle ID with new bundle ID in patched entitlements
710
+ # Read old bundle ID from the old Info.plist which was saved for this purpose
711
+ OLD_BUNDLE_ID="$(PlistBuddy -c "Print :CFBundleIdentifier" "$TEMP_DIR/oldInfo.plist")"
712
+ NEW_BUNDLE_ID="$(bundle_id_for_provison "$NEW_PROVISION")"
713
+ log "Replacing old bundle ID '$OLD_BUNDLE_ID' with new bundle ID '$NEW_BUNDLE_ID' in patched entitlements"
714
+ sed -i .bak "s/$OLD_BUNDLE_ID/$NEW_BUNDLE_ID/g" "$PATCHED_ENTITLEMENTS"
715
+
716
+ log "Resigning application using certificate: '$CERTIFICATE'"
717
+ log "and patched entitlements:"
718
+ log "$(cat "$PATCHED_ENTITLEMENTS")"
719
+ cp -f "$PATCHED_ENTITLEMENTS" "$APP_PATH/archived-expanded-entitlements.xcent"
720
+ /usr/bin/codesign ${VERBOSE} -f -s "$CERTIFICATE" --entitlements "$PATCHED_ENTITLEMENTS" "$APP_PATH"
721
+ checkStatus
578
722
  else
579
723
  log "Extracting entitlements from provisioning profile"
580
724
  PlistBuddy -x -c "Print Entitlements" "$TEMP_DIR/profile.plist" > "$TEMP_DIR/newEntitlements"
@@ -582,13 +726,20 @@ function resign {
582
726
  log "Resigning application using certificate: '$CERTIFICATE'"
583
727
  log "and entitlements from provisioning profile: $NEW_PROVISION"
584
728
  cp -- "$TEMP_DIR/newEntitlements" "$APP_PATH/archived-expanded-entitlements.xcent"
585
- /usr/bin/codesign ${VERBOSE} -f -s "$CERTIFICATE" --entitlements "$TEMP_DIR/newEntitlements" "$APP_PATH"
729
+ /usr/bin/codesign ${VERBOSE} ${KEYCHAIN_FLAG} -f -s "$CERTIFICATE" --entitlements "$TEMP_DIR/newEntitlements" "$APP_PATH"
586
730
  checkStatus
587
731
  fi
588
732
 
589
733
  # Remove the temporary files if they were created before generating ipa
590
734
  rm -f "$TEMP_DIR/newEntitlements"
735
+ rm -f "$PROFILE_ENTITLEMENTS"
736
+ rm -f "$APP_ENTITLEMENTS"
737
+ rm -f "$PATCHED_ENTITLEMENTS"
738
+ rm -f "$PATCHED_ENTITLEMENTS.bak"
739
+ rm -r "$TEMP_DIR/old-embedded-profile.plist"
591
740
  rm -f "$TEMP_DIR/profile.plist"
741
+ rm -f "$TEMP_DIR/old-embedded.mobileprovision"
742
+ rm -f "$TEMP_DIR/oldInfo.plist"
592
743
  }
593
744
 
594
745
  # Sign nested applications and app extensions
data/lib/sigh.rb CHANGED
@@ -13,6 +13,7 @@ module Sigh
13
13
 
14
14
  Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore
15
15
  UI = FastlaneCore::UI
16
+ ROOT = Pathname.new(File.expand_path('../..', __FILE__))
16
17
 
17
18
  ENV['FASTLANE_TEAM_ID'] ||= ENV["SIGH_TEAM_ID"]
18
19
  ENV['DELIVER_USER'] ||= ENV["SIGH_USERNAME"]
@@ -13,7 +13,6 @@ module Sigh
13
13
  FastlaneCore::UpdateChecker.show_update_status('sigh', Sigh::VERSION)
14
14
  end
15
15
 
16
- # rubocop:disable Metrics/MethodLength
17
16
  def run
18
17
  program :version, Sigh::VERSION
19
18
  program :description, 'CLI for \'sigh\' - Because you would rather spend your time building stuff than fighting provisioning'
@@ -70,7 +69,9 @@ module Sigh
70
69
  c.option '-e', '--entitlements PATH', String, 'The path to the entitlements file to use.'
71
70
  c.option '--short_version STRING', String, 'Short version string to force binary and all nested binaries to use (CFBundleShortVersionString).'
72
71
  c.option '--bundle_version STRING', String, 'Bundle version to force binary and all nested binaries to use (CFBundleIdentifier).'
72
+ c.option '--use_app_entitlements', 'Extract app bundle codesigning entitlements and combine with entitlements from new provisionin profile.'
73
73
  c.option '-g', '--new_bundle_id STRING', String, 'New application bundle ID'
74
+ c.option '--keychain_path STRING', String, 'Path to the keychain that /usr/bin/codesign should use'
74
75
 
75
76
  c.action do |args, options|
76
77
  Sigh::Resign.new.run(options, args)
@@ -96,7 +97,6 @@ module Sigh
96
97
 
97
98
  run!
98
99
  end
99
- # rubocop:enable Metrics/MethodLength
100
100
 
101
101
  def multiple_values_option_proc(command, name)
102
102
  proc do |value|
@@ -41,7 +41,6 @@ module Sigh
41
41
  return command, clean_expired, clean_pattern, force
42
42
  end
43
43
 
44
- # rubocop:disable Metrics/AbcSize
45
44
  def self.list_profiles
46
45
  profiles = load_profiles
47
46
 
@@ -84,7 +83,6 @@ module Sigh
84
83
 
85
84
  UI.message "You can remove all expired profiles using `sigh manage -e`" if profiles_expired.count > 0
86
85
  end
87
- # rubocop:enable Metrics/AbcSize
88
86
 
89
87
  def self.profile_info(profile)
90
88
  if $verbose
data/lib/sigh/resign.rb CHANGED
@@ -5,19 +5,18 @@ module Sigh
5
5
  class Resign
6
6
  def run(options, args)
7
7
  # get the command line inputs and parse those into the vars we need...
8
-
9
- ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id = get_inputs(options, args)
8
+ ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id, use_app_entitlements = get_inputs(options, args)
10
9
  # ... then invoke our programmatic interface with these vars
11
- unless resign(ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id)
10
+ unless resign(ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id, use_app_entitlements, keychain_path)
12
11
  UI.user_error!("Failed to re-sign .ipa")
13
12
  end
14
13
  end
15
14
 
16
- def self.resign(ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id)
17
- self.new.resign(ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id)
15
+ def self.resign(ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id, use_app_entitlements)
16
+ self.new.resign(ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id, use_app_entitlements)
18
17
  end
19
18
 
20
- def resign(ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id)
19
+ def resign(ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id, use_app_entitlements, keychain_path)
21
20
  resign_path = find_resign_path
22
21
  signing_identity = find_signing_identity(signing_identity)
23
22
 
@@ -27,7 +26,7 @@ module Sigh
27
26
 
28
27
  # validate that we have valid values for all these params, we don't need to check signing_identity because `find_signing_identity` will only ever return a valid value
29
28
  validate_params(resign_path, ipa, provisioning_profiles)
30
- entitlements = "-e #{entitlements}" if entitlements
29
+ entitlements = "-e #{entitlements.shellescape}" if entitlements
31
30
  provisioning_options = provisioning_profiles.map { |fst, snd| "-p #{[fst, snd].compact.map(&:shellescape).join('=')}" }.join(' ')
32
31
  version = "-n #{version}" if version
33
32
  display_name = "-d #{display_name.shellescape}" if display_name
@@ -35,6 +34,8 @@ module Sigh
35
34
  bundle_version = "--bundle-version #{bundle_version}" if bundle_version
36
35
  verbose = "-v" if $verbose
37
36
  bundle_id = "-b '#{new_bundle_id}'" if new_bundle_id
37
+ use_app_entitlements_flag = "--use-app-entitlements" if use_app_entitlements
38
+ specific_keychain = "--keychain-path #{keychain_path.shellescape}" if keychain_path
38
39
 
39
40
  command = [
40
41
  resign_path.shellescape,
@@ -46,9 +47,11 @@ module Sigh
46
47
  display_name,
47
48
  short_version,
48
49
  bundle_version,
50
+ use_app_entitlements_flag,
49
51
  verbose,
50
52
  bundle_id,
51
- ipa.shellescape
53
+ ipa.shellescape,
54
+ specific_keychain
52
55
  ].join(' ')
53
56
 
54
57
  puts command.magenta
@@ -73,16 +76,18 @@ module Sigh
73
76
  short_version = options.short_version || nil
74
77
  bundle_version = options.bundle_version || nil
75
78
  new_bundle_id = options.new_bundle_id || nil
79
+ use_app_entitlements = options.use_app_entitlements || nil
80
+ keychain_path = options.keychain_path || nil
76
81
 
77
82
  if options.provisioning_name
78
83
  UI.important "The provisioning_name (-n) option is not applicable to resign. You should use provisioning_profile (-p) instead"
79
84
  end
80
85
 
81
- return ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id
86
+ return ipa, signing_identity, provisioning_profiles, entitlements, version, display_name, short_version, bundle_version, new_bundle_id, use_app_entitlements, keychain_path
82
87
  end
83
88
 
84
89
  def find_resign_path
85
- File.join(Helper.gem_path('sigh'), 'lib', 'assets', 'resign.sh')
90
+ File.join(Sigh::ROOT, 'lib', 'assets', 'resign.sh')
86
91
  end
87
92
 
88
93
  def find_ipa
data/lib/sigh/runner.rb CHANGED
@@ -117,7 +117,6 @@ module Sigh
117
117
  end
118
118
 
119
119
  # Certificate to use based on the current distribution mode
120
- # rubocop:disable Metrics/AbcSize
121
120
  def certificate_to_use
122
121
  if profile_type == Spaceship.provisioning_profile.Development
123
122
  certificates = Spaceship.certificate.development.all
@@ -170,7 +169,6 @@ module Sigh
170
169
  return certificates if Sigh.config[:development] # development profiles support multiple certificates
171
170
  return certificates.first
172
171
  end
173
- # rubocop:enable Metrics/AbcSize
174
172
 
175
173
  # Downloads and stores the provisioning profile
176
174
  def download_profile(profile)
data/lib/sigh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sigh
2
- VERSION = "1.9.0"
2
+ VERSION = "1.10.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sigh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-01 00:00:00.000000000 Z
11
+ date: 2016-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core