sigh 1.0.0.beta6 → 1.0.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: 33fcc1b6c104994d25ca828c84af9ccde4b86c77
4
- data.tar.gz: 50cd6b4c44fbf6710255735fd9d2289f11cc3f78
3
+ metadata.gz: 028ba40fa0cd96cf905b14a98f2b190265089663
4
+ data.tar.gz: ae2dbbf1e4fc53d9fe27672e366e5fcf1ffdda6c
5
5
  SHA512:
6
- metadata.gz: c8e5198a0a7f2033c3e04a0baddae2d4197ed43adae4640d6d99d5ccac001c39cac24b49883415ae0c46f261b643de4b18d8657b47c01d701ad04af46b844d2a
7
- data.tar.gz: ab3a37c143502523796fe61c8ea25b44aa29edf84c4aaf85f3caff95d8e43e5144ea6661c971954f4f8d28f9a424f080774bc6f64d9c6797bd2b8dd3ed358502
6
+ metadata.gz: 6f222fd7d599f58e5909914cec7c737420d6f43781a8317e5290b74c7d26e8c8fa4a54756940efbd9954871c3af2ea433b077747b1eadb5a965180d16832fba9
7
+ data.tar.gz: ca5c10d1e4a583f8012f674cc0afe434ebc4ecaf2888a133fdedbdfeec9e5e7ddfb445ea93e6881ced3c40112942e5083af6ed79e89b4c86729956ec1c0b76f0
data/README.md CHANGED
@@ -13,7 +13,12 @@
13
13
  <b>sigh</b> &bull;
14
14
  <a href="https://github.com/KrauseFx/produce">produce</a> &bull;
15
15
  <a href="https://github.com/KrauseFx/cert">cert</a> &bull;
16
- <a href="https://github.com/KrauseFx/codes">codes</a>
16
+ <a href="https://github.com/KrauseFx/codes">codes</a> &bull;
17
+ <a href="https://github.com/fastlane/spaceship">spaceship</a> &bull;
18
+ <a href="https://github.com/fastlane/pilot">pilot</a> &bull;
19
+ <a href="https://github.com/fastlane/boarding">boarding</a> &bull;
20
+ <a href="https://github.com/fastlane/gym">gym</a>
21
+
17
22
  </p>
18
23
  -------
19
24
 
@@ -34,8 +39,6 @@ sigh
34
39
 
35
40
  Get in contact with the developer on Twitter: [@KrauseFx](https://twitter.com/KrauseFx)
36
41
 
37
- Special thanks to [Matthias Tretter](https://twitter.com/myell0w) for coming up with the name.
38
-
39
42
  -------
40
43
  <p align="center">
41
44
  <a href="#features">Features</a> &bull;
@@ -51,10 +54,6 @@ Special thanks to [Matthias Tretter](https://twitter.com/myell0w) for coming up
51
54
 
52
55
  <h5 align="center"><code>sigh</code> is part of <a href="https://fastlane.tools">fastlane</a>: connect all deployment tools into one streamlined workflow.</h5>
53
56
 
54
- ### spaceship version
55
-
56
- If you're feeling adventurous and want to test the new `sigh` beta with [spaceship](https://spaceship.airforce), update using `sudo gem update sigh --pre`. More information in the [release notes](https://github.com/KrauseFx/sigh/releases/tag/1.0.0.beta5).
57
-
58
57
  # Features
59
58
 
60
59
  - **Download** the latest provisioning profile for your app
@@ -73,7 +72,7 @@ To automate iOS Push profiles you can use [PEM](https://github.com/KrauseFx/PEM)
73
72
  ### Why not let Xcode do the work?
74
73
 
75
74
  - ```sigh``` can easily be integrated into your CI-server (e.g. Jenkins)
76
- - Xcode sometimes invalidates all existing profiles ([Screenshot](assets/SignErrors.png))
75
+ - Xcode sometimes invalidates [all existing profiles](assets/SignErrors.png)
77
76
  - You have control over what happens
78
77
  - You still get to have the signing files, which you can then use for your build scripts or store in git
79
78
 
@@ -111,7 +110,11 @@ To generate the profile in a specific directory:
111
110
 
112
111
  sigh -o "~/Certificates/"
113
112
 
114
- For a list of available commands run
113
+ To download all your provisioning profiles use
114
+
115
+ sigh download_all
116
+
117
+ For a list of available parameters and commands run
115
118
 
116
119
  sigh --help
117
120
 
@@ -121,21 +124,32 @@ By default, ```sigh``` will install the downloaded profile on your machine. If y
121
124
 
122
125
  sigh --skip_install
123
126
 
124
- To save the provisioning profile under a specific name, use the -f option:
127
+ To save the provisioning profile under a specific name, use the -q option:
125
128
 
126
- sigh -a com.krausefx.app -u username -f "myProfile.mobileprovision"
129
+ sigh -a com.krausefx.app -u username -q "myProfile.mobileprovision"
130
+
131
+ If for some reason you don't want `sigh` to verify that the code signing identity is installed on your local machine:
132
+
133
+ sigh --skip_certificate_verification
127
134
 
128
135
  If you need the provisioning profile to be renewed regardless of its state use the `--force` option. This gives you a profile with the maximum lifetime. `--force` will also add all available devices to this profile.
129
136
 
130
137
  sigh --force
131
138
 
132
- By default, ```sigh``` will include all certificates on development profiles, and first certificate on other types. If you need to specify which certificate to use you can either use the environment variable `SIGH_CERTIFICATE`, or pass the name or expiry date of the certificate as argument:
139
+ By default, `sigh` will include all certificates on development profiles, and first certificate on other types. If you need to specify which certificate to use you can either use the environment variable `SIGH_CERTIFICATE`, or pass the name or expiry date of the certificate as argument:
133
140
 
134
141
  sigh -c "SunApps GmbH"
135
142
 
136
- Or identify be expire date if you're using the same names for multiple certificates
143
+ For a list of available parameters and commands run
144
+
145
+ sigh --help
146
+
147
+ # Repair
148
+
149
+ `sigh` can automatically repair all your existing provisioning profiles which are expired or just invalid.
150
+
151
+ sigh repair
137
152
 
138
- sigh -d "Nov 11, 2017"
139
153
 
140
154
  # Resign
141
155
 
@@ -165,66 +179,56 @@ Or delete all `iOS Team Provisioning Profile` by using a regular expression
165
179
  sigh manage -p "iOS\ ?Team Provisioning Profile:"
166
180
 
167
181
  ## Environment Variables
168
- In case you prefer environment variables:
169
-
170
- - `SIGH_USERNAME`
171
- - `SIGH_APP_IDENTIFIER` (The App's Bundle ID , e.g. `com.yourteam.awesomeapp`)
172
- - `SIGH_TEAM_ID` (The Team ID, e.g. `Q2CBPK58CA`)
173
- - `SIGH_PROVISIONING_PROFILE_NAME` (set a custom name for the name of the generated file)
174
182
 
175
- Choose signing certificate to use:
176
-
177
- - `SIGH_CERTIFICATE` (The name of the certificate to use)
178
- - `SIGH_CERTIFICATE_ID` (The ID of the certificate)
179
- - `SIGH_CERTIFICATE_EXPIRE_DATE` (The expire date of the certificate)
180
-
181
- As always, run `sigh --help` to get a list of all variables.
183
+ Run `sigh --help` to get a list of all available environment variables.
182
184
 
183
185
  If you're using [cert](https://github.com/KrauseFx/cert) in combination with [fastlane](https://github.com/KrauseFx/fastlane) the signing certificate will automatically be selected for you. (make sure to run `cert` before `sigh`)
184
186
 
185
- `sigh` will store the `UDID` of the generated provisioning profile in the environment: `SIGH_UDID`.
186
-
187
187
  # How does it work?
188
188
 
189
- ```sigh``` will access the ```iOS Dev Center``` to download, renew or generate the ```.mobileprovision``` file. Check out the full source code: [developer_center.rb](https://github.com/KrauseFx/sigh/blob/master/lib/sigh/developer_center.rb).
189
+ `sigh` will access the `iOS Dev Center` to download, renew or generate the `.mobileprovision` file. It uses [spaceship](https://spaceship.airforce) to communicate with Apple's web services.
190
190
 
191
191
 
192
192
  ## How is my password stored?
193
- ```sigh``` uses the [password manager](https://github.com/KrauseFx/CredentialsManager) from `fastlane`. Take a look the [CredentialsManager README](https://github.com/KrauseFx/CredentialsManager) for more information.
193
+ `sigh` uses the [CredentialsManager](https://github.com/fastlane/CredentialsManager) from `fastlane`.
194
194
 
195
195
  # Tips
196
196
  ## [`fastlane`](https://fastlane.tools) Toolchain
197
197
 
198
198
  - [`fastlane`](https://fastlane.tools): Connect all deployment tools into one streamlined workflow
199
- - [`deliver`](https://github.com/KrauseFx/deliver): Upload screenshots, metadata and your app to the App Store using a single command
199
+ - [`deliver`](https://github.com/KrauseFx/deliver): Upload screenshots, metadata and your app to the App Store
200
200
  - [`snapshot`](https://github.com/KrauseFx/snapshot): Automate taking localized screenshots of your iOS app on every device
201
201
  - [`frameit`](https://github.com/KrauseFx/frameit): Quickly put your screenshots into the right device frames
202
202
  - [`PEM`](https://github.com/KrauseFx/pem): Automatically generate and renew your push notification profiles
203
203
  - [`produce`](https://github.com/KrauseFx/produce): Create new iOS apps on iTunes Connect and Dev Portal using the command line
204
204
  - [`cert`](https://github.com/KrauseFx/cert): Automatically create and maintain iOS code signing certificates
205
205
  - [`codes`](https://github.com/KrauseFx/codes): Create promo codes for iOS Apps using the command line
206
+ - [`spaceship`](https://github.com/fastlane/spaceship): Ruby library to access the Apple Dev Center and iTunes Connect
207
+ - [`pilot`](https://github.com/fastlane/pilot): The best way to manage your TestFlight testers and builds from your terminal
208
+ - [`boarding`](https://github.com/fastlane/boarding): The easiest way to invite your TestFlight beta testers
209
+ - [`gym`](https://github.com/fastlane/gym): Building your iOS apps has never been easier
210
+
206
211
 
207
212
  ##### [Like this tool? Be the first to know about updates and new fastlane tools](https://tinyletter.com/krausefx)
208
213
 
209
214
  ## Use the 'Provisioning Quicklook plugin'
210
215
  Download and install the [Provisioning Plugin](https://github.com/chockenberry/Provisioning).
211
216
 
212
- It will show you the ```mobileprovision``` files like this:
217
+ It will show you the `mobileprovision` files like this:
213
218
  ![assets/QuickLookScreenshot.png](assets/QuickLookScreenshot.png)
214
219
 
220
+ ## App Identifier couldn't be found
221
+
222
+ If you also want to create a new App Identifier on the Apple Developer Portal, check out [produce](https://github.com/fastlane/produce), which does exactly that.
223
+
224
+ ## What happens to my Xcode managed profiles?
225
+
226
+ `sigh` will never touch or use the profiles which are created and managed by Xcode. Instead `sigh` will manage its own set of provisioning profiles.
215
227
 
216
228
  # Need help?
217
- - If there is a technical problem with ```sigh```, submit an issue.
218
- - I'm available for contract work - drop me an email: sigh@krausefx.com
229
+ Please submit an issue on GitHub and provide information about your setup
219
230
 
220
231
  # License
221
232
  This project is licensed under the terms of the MIT license. See the LICENSE file.
222
233
 
223
- # Contributing
224
-
225
- 1. Create an issue to start a discussion about your idea
226
- 2. Fork it (https://github.com/KrauseFx/sigh/fork)
227
- 3. Create your feature branch (`git checkout -b my-new-feature`)
228
- 4. Commit your changes (`git commit -am 'Add some feature'`)
229
- 5. Push to the branch (`git push origin my-new-feature`)
230
- 6. Create a new Pull Request
234
+ > This project and all fastlane tools are in no way affiliated with Apple Inc. This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. All fastlane tools run on your own computer or server, so your credentials or other sensitive information will never leave your own computer. You are responsible for how you use fastlane tools.
data/bin/sigh CHANGED
@@ -23,8 +23,6 @@ class SighApplication
23
23
  program :help, 'GitHub', 'https://github.com/krausefx/sigh'
24
24
  program :help_formatter, :compact
25
25
 
26
- always_trace!
27
-
28
26
  FastlaneCore::CommanderGenerator.new.generate(Sigh::Options.available_options)
29
27
 
30
28
  command :renew do |c|
@@ -37,6 +35,27 @@ class SighApplication
37
35
  end
38
36
  end
39
37
 
38
+ command :download_all do |c|
39
+ c.syntax = 'sigh download_all'
40
+ c.description = 'Downloads all valid provisioning profiles'
41
+
42
+ c.action do |args, options|
43
+ Sigh.config = FastlaneCore::Configuration.create(Sigh::Options.available_options, options.__hash__)
44
+ Sigh::Manager.download_all
45
+ end
46
+ end
47
+
48
+ command :repair do |c|
49
+ c.syntax = 'sigh repair'
50
+ c.description = 'Repairs all expired or invalid provisioning profiles'
51
+
52
+ c.action do |args, options|
53
+ Sigh.config = FastlaneCore::Configuration.create(Sigh::Options.available_options, options.__hash__)
54
+ require 'sigh/repair'
55
+ Sigh::Repair.new.repair_all
56
+ end
57
+ end
58
+
40
59
  command :resign do |c|
41
60
  c.syntax = 'sigh resign'
42
61
  c.description = 'Resigns an existing ipa file with the given provisioning profile'
@@ -51,7 +70,7 @@ class SighApplication
51
70
  command :manage do |c|
52
71
  c.syntax = 'sigh manage'
53
72
  c.description = 'Manage installed provisioning profiles on your system.'
54
-
73
+
55
74
  c.option '-e', '--clean_expired', 'Remove all expired provisioning profiles.'
56
75
 
57
76
  c.option '-p', '--clean_pattern STRING', String, 'Remove any provisioning profiles that matches the regular expression.'
@@ -66,7 +85,6 @@ class SighApplication
66
85
 
67
86
  run!
68
87
  end
69
-
70
88
  end
71
89
 
72
90
  begin
data/lib/assets/resign.sh CHANGED
@@ -362,13 +362,18 @@ else
362
362
  # checkStatus -- if this fails it's likely because the keychain-access-groups key does not exist, so we have nothing to update
363
363
  if [[ "$CERTIFICATE" == *Distribution* ]]; then
364
364
  IS_ENTERPRISE_PROFILE=`PlistBuddy -c "Print :ProvisionsAllDevices" "$TEMP_DIR/profile.plist" | tr -d '\n'`
365
+ ADHOC_PROVISIONING_DEVICES=`PlistBuddy -c "Print :ProvisionedDevices" "$TEMP_DIR/profile.plist" | tr -d '\n'`
365
366
 
366
367
  echo "Assuming Distribution Identity"
367
368
  if [ "$ADJUST_BETA_REPORTS_ACTIVE_FLAG" == "1" ]; then
368
369
  if [ "$IS_ENTERPRISE_PROFILE" == "true" ]; then
369
370
  echo "Ensuring beta-reports-active is not included for Enterprise environment"
370
- PlistBuddy -c "Delete :beta-reports-active" "$TEMP_DIR/newEntitlements"
371
- checkStatus
371
+ PlistBuddy -c "Delete :beta-reports-active" "$TEMP_DIR/newEntitlements" || true
372
+ # checkStatus -- this can fail is beta-reports-active isn't present, which is OK
373
+ elif [ -n "$ADHOC_PROVISIONING_DEVICES" ]; then
374
+ echo "Ensuring beta-reports-active is not included for Adhoc environment"
375
+ PlistBuddy -c "Delete :beta-reports-active" "$TEMP_DIR/newEntitlements" || true
376
+ # checkStatus -- this can fail is beta-reports-active isn't present, which is OK
372
377
  else
373
378
  echo "Ensuring beta-reports-active is present and enabled"
374
379
  # new beta key is only used for Distribution; might not exist yet, if we were building Development
@@ -435,7 +440,7 @@ echo "Repackaging as $NEW_FILE" >&2
435
440
  # Zip all the contents, saving the zip file in the above directory
436
441
  # Navigate back to the orignating directory (sending the output to null)
437
442
  pushd "$TEMP_DIR" > /dev/null
438
- zip -qr "../$TEMP_DIR.ipa" *
443
+ zip -qry "../$TEMP_DIR.ipa" *
439
444
  popd > /dev/null
440
445
 
441
446
  # Move the resulting ipa to the target destination
data/lib/sigh.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'sigh/version'
2
- require 'sigh/dependency_checker'
3
2
  require 'sigh/resign'
3
+ require 'sigh/manager'
4
+ require 'sigh/options'
5
+
4
6
  require 'fastlane_core'
5
7
 
6
8
  module Sigh
@@ -13,6 +15,4 @@ module Sigh
13
15
 
14
16
  ENV['FASTLANE_TEAM_ID'] ||= ENV["SIGH_TEAM_ID"]
15
17
  ENV['DELIVER_USER'] ||= ENV["SIGH_USERNAME"]
16
-
17
- DependencyChecker.check_dependencies
18
18
  end
@@ -0,0 +1,33 @@
1
+ module Sigh
2
+ class DownloadAll
3
+ # Download all valid provisioning profiles
4
+ def download_all
5
+ Helper.log.info "Starting login with user '#{Sigh.config[:username]}'"
6
+ Spaceship.login(Sigh.config[:username], nil)
7
+ Spaceship.select_team
8
+ Helper.log.info "Successfully logged in"
9
+
10
+ Spaceship.provisioning_profile.all.each do |profile|
11
+ if profile.valid?
12
+ Helper.log.info "Downloading profile '#{profile.name}'...".green
13
+ download_profile(profile)
14
+ else
15
+ Helper.log.info "Skipping invalid/expired profile '#{profile.name}'".yellow
16
+ end
17
+ end
18
+ end
19
+
20
+ def download_profile(profile)
21
+ output = Sigh.config[:output_path] || "/tmp"
22
+
23
+ profile_name = "#{profile.class.pretty_type}_#{profile.app.bundle_id}.mobileprovision" # default name
24
+
25
+ output_path = File.join(output, profile_name)
26
+ File.open(output_path, "wb") do |f|
27
+ f.write(profile.download)
28
+ end
29
+
30
+ Manager.install_profile(output_path) unless Sigh.config[:skip_install]
31
+ end
32
+ end
33
+ end
@@ -26,20 +26,21 @@ module Sigh
26
26
  # copy to Xcode provisioning profile directory
27
27
  FileUtils.copy profile, destination
28
28
 
29
- if File.exists? destination
29
+ if File.exist? destination
30
30
  Helper.log.info "Profile installed at \"#{destination}\""
31
31
  else
32
32
  raise "Failed installation of provisioning profile at location: #{destination}".red
33
33
  end
34
34
  end
35
35
 
36
- def self.get_inputs(options, args)
36
+ def self.get_inputs(options, _args)
37
37
  clean_expired = options.clean_expired
38
38
  clean_pattern = /#{options.clean_pattern}/ if options.clean_pattern
39
- command = (clean_expired != nil || clean_pattern != nil) ? CLEANUP : LIST
39
+ command = (!clean_expired.nil? || !clean_pattern.nil?) ? CLEANUP : LIST
40
40
  return command, clean_expired, clean_pattern
41
41
  end
42
42
 
43
+ # rubocop:disable Metrics/AbcSize
43
44
  def self.list_profiles
44
45
  profiles = load_profiles
45
46
 
@@ -63,7 +64,7 @@ module Sigh
63
64
  Helper.log.info profile["Name"].yellow
64
65
  end
65
66
  end
66
-
67
+
67
68
  profiles_expired = profiles.select { |profile| profile["ExpirationDate"] < now }
68
69
  if profiles_expired.count > 0
69
70
  Helper.log.info ""
@@ -72,7 +73,7 @@ module Sigh
72
73
  Helper.log.info profile["Name"].red
73
74
  end
74
75
  end
75
-
76
+
76
77
  Helper.log.info ""
77
78
  Helper.log.info "Summary"
78
79
  Helper.log.info "#{profiles.count} installed profiles"
@@ -82,11 +83,12 @@ module Sigh
82
83
 
83
84
  Helper.log.info "You can remove all expired profiles using `sigh manage -e`" if profiles_expired.count > 0
84
85
  end
86
+ # rubocop:enable Metrics/AbcSize
85
87
 
86
88
  def self.cleanup_profiles(expired = false, pattern = nil)
87
89
  now = DateTime.now
88
90
 
89
- profiles = load_profiles.select { |profile| (expired && profile["ExpirationDate"] < now) || (pattern != nil && profile["Name"] =~ pattern) }
91
+ profiles = load_profiles.select { |profile| (expired && profile["ExpirationDate"] < now) || (!pattern.nil? && profile["Name"] =~ pattern) }
90
92
 
91
93
  Helper.log.info "The following provisioning profiles are either expired or matches your pattern:"
92
94
  profiles.each do |profile|
@@ -108,14 +110,14 @@ module Sigh
108
110
 
109
111
  profiles = []
110
112
  profile_paths.each do |profile_path|
111
- profile = Plist::parse_xml(`security cms -D -i '#{profile_path}'`)
113
+ profile = Plist.parse_xml(`security cms -D -i '#{profile_path}'`)
112
114
  profile['Path'] = profile_path
113
115
  profiles << profile
114
116
  end
115
117
 
116
- profiles = profiles.sort_by {|profile| profile["Name"].downcase}
118
+ profiles = profiles.sort_by { |profile| profile["Name"].downcase }
117
119
 
118
120
  return profiles
119
121
  end
120
122
  end
121
- end
123
+ end
data/lib/sigh/manager.rb CHANGED
@@ -1,10 +1,9 @@
1
1
  require 'plist'
2
- require 'sigh/spaceship/runner'
2
+ require 'sigh/runner'
3
3
 
4
4
  module Sigh
5
5
  class Manager
6
6
  def self.start
7
- start = Time.now
8
7
  path = Sigh::Runner.new.run
9
8
 
10
9
  return nil unless path
@@ -15,8 +14,12 @@ module Sigh
15
14
  file_name = File.basename(path)
16
15
  end
17
16
 
18
- output = File.join(Sigh.config[:output_path].gsub("~", ENV["HOME"]), file_name)
19
- (FileUtils.mv(path, output) rescue nil) # in case it already exists
17
+ output = File.join(File.expand_path(Sigh.config[:output_path]), file_name)
18
+ begin
19
+ FileUtils.mv(path, output)
20
+ rescue
21
+ # in case it already exists
22
+ end
20
23
 
21
24
  install_profile(output) unless Sigh.config[:skip_install]
22
25
 
@@ -25,25 +28,16 @@ module Sigh
25
28
  return File.expand_path(output)
26
29
  end
27
30
 
28
- def self.install_profile(profile)
29
- Helper.log.info "Installing provisioning profile..."
30
- profile_path = File.expand_path("~") + "/Library/MobileDevice/Provisioning Profiles/"
31
- profile_filename = ENV["SIGH_UDID"] + ".mobileprovision"
32
- destination = profile_path + profile_filename
33
-
34
- # If the directory doesn't exist, make it first
35
- unless File.directory?(profile_path)
36
- FileUtils.mkdir_p(profile_path)
37
- end
31
+ def self.download_all
32
+ require 'sigh/download_all'
33
+ DownloadAll.new.download_all
34
+ end
38
35
 
39
- # copy to Xcode provisioning profile directory
40
- (FileUtils.copy profile, destination rescue nil) # if the directory doesn't exist yet
36
+ def self.install_profile(profile)
37
+ udid = FastlaneCore::ProvisioningProfile.uuid(profile)
38
+ ENV["SIGH_UDID"] = udid if udid
41
39
 
42
- if File.exists? destination
43
- Helper.log.info "Profile successfully installed".green
44
- else
45
- raise "Failed installation of provisioning profile at location: #{destination}".red
46
- end
40
+ FastlaneCore::ProvisioningProfile.install(profile)
47
41
  end
48
42
  end
49
43
  end
data/lib/sigh/options.rb CHANGED
@@ -6,7 +6,6 @@ module Sigh
6
6
  def self.available_options
7
7
  @@options ||= [
8
8
  FastlaneCore::ConfigItem.new(key: :adhoc,
9
- short_option: "-k",
10
9
  env_name: "SIGH_AD_HOC",
11
10
  description: "Setting this flag will generate AdHoc profiles instead of App Store Profiles",
12
11
  is_string: false,
@@ -35,18 +34,15 @@ module Sigh
35
34
  short_option: "-u",
36
35
  env_name: "SIGH_USERNAME",
37
36
  description: "Your Apple ID Username",
38
- default_value: ENV["DELIVER_USER"] || CredentialsManager::AppfileConfig.try_fetch_value(:apple_id),
39
- verify_block: Proc.new do |value|
40
- CredentialsManager::PasswordManager.shared_manager(value)
41
- end),
37
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)),
42
38
  FastlaneCore::ConfigItem.new(key: :team_id,
43
- short_option: "-t",
39
+ short_option: "-b",
44
40
  env_name: "SIGH_TEAM_ID",
45
41
  description: "The ID of your team if you're in multiple teams",
46
42
  optional: true,
47
43
  default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id),
48
- verify_block: Proc.new do |value|
49
- ENV["FASTLANE_TEAM_ID"] = value
44
+ verify_block: proc do |value|
45
+ ENV["FASTLANE_TEAM_ID"] = value
50
46
  end),
51
47
  FastlaneCore::ConfigItem.new(key: :team_name,
52
48
  short_option: "-l",
@@ -54,8 +50,8 @@ module Sigh
54
50
  description: "The name of your team if you're in multiple teams",
55
51
  optional: true,
56
52
  default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_name),
57
- verify_block: Proc.new do |value|
58
- ENV["FASTLANE_TEAM_NAME"] = value
53
+ verify_block: proc do |value|
54
+ ENV["FASTLANE_TEAM_NAME"] = value
59
55
  end),
60
56
  FastlaneCore::ConfigItem.new(key: :provisioning_name,
61
57
  short_option: "-n",
@@ -67,8 +63,8 @@ module Sigh
67
63
  env_name: "SIGH_OUTPUT_PATH",
68
64
  description: "Directory in which the profile should be stored",
69
65
  default_value: ".",
70
- verify_block: Proc.new do |value|
71
- raise "Could not find output directory '#{value}'".red unless File.exists?(value)
66
+ verify_block: proc do |value|
67
+ raise "Could not find output directory '#{value}'".red unless File.exist?(value)
72
68
  end),
73
69
  FastlaneCore::ConfigItem.new(key: :cert_id,
74
70
  short_option: "-i",
@@ -80,20 +76,26 @@ module Sigh
80
76
  env_name: "SIGH_CERTIFICATE",
81
77
  description: "The certificate name to use for new profiles, or to renew with. (e.g. \"Felix Krause\")",
82
78
  optional: true),
83
- FastlaneCore::ConfigItem.new(key: :cert_date,
84
- short_option: "-d",
85
- env_name: "SIGH_CERTIFICATE_EXPIRE_DATE",
86
- description: "The certificate with the given expiry date used to renew. (e.g. \"Nov 11, 2017\")",
87
- optional: true),
88
79
  FastlaneCore::ConfigItem.new(key: :filename,
89
- short_option: "-f",
80
+ short_option: "-q",
90
81
  env_name: "SIGH_PROFILE_FILE_NAME",
91
82
  optional: true,
92
83
  description: "Filename to use for the generated provisioning profile (must include .mobileprovision)",
93
- verify_block: Proc.new do |value|
94
- raise "The output name must end with .mobileprovision".red unless value.end_with?".mobileprovision"
95
- end)
96
-
84
+ verify_block: proc do |value|
85
+ raise "The output name must end with .mobileprovision".red unless value.end_with? ".mobileprovision"
86
+ end),
87
+ FastlaneCore::ConfigItem.new(key: :skip_fetch_profiles,
88
+ env_name: "SIGH_SKIP_FETCH_PROFILES",
89
+ description: "Skips the verification of existing profiles which is useful if you have thousands of profiles",
90
+ is_string: false,
91
+ default_value: false,
92
+ short_option: "-w"),
93
+ FastlaneCore::ConfigItem.new(key: :skip_certificate_verification,
94
+ short_option: '-z',
95
+ env_name: "SIGH_SKIP_CERTIFICATE_VERIFICATION",
96
+ description: "Skips the verification of the certificates for every existing profiles. This will make sure the provisioning profile can be used on the local machine",
97
+ is_string: false,
98
+ default_value: false)
97
99
  ]
98
100
  end
99
101
  end
@@ -0,0 +1,30 @@
1
+ module Sigh
2
+ class Repair
3
+ def repair_all
4
+ Helper.log.info "Starting login with user '#{Sigh.config[:username]}'"
5
+ Spaceship.login(Sigh.config[:username], nil)
6
+ Spaceship.select_team
7
+ Helper.log.info "Successfully logged in"
8
+
9
+ # Select all 'Invalid' or 'Expired' provisioning profiles
10
+ broken_profiles = Spaceship.provisioning_profile.all.find_all do |profile|
11
+ (profile.status == "Invalid" or profile.status == "Expired")
12
+ end
13
+
14
+ if broken_profiles.count == 0
15
+ Helper.log.info "All provisioning profiles are valid, nothing to do".green
16
+ return
17
+ end
18
+
19
+ Helper.log.info "Going to repair #{broken_profiles.count} provisioning profiles".green
20
+
21
+ # Iterate over all broken profiles and repair them
22
+ broken_profiles.each do |profile|
23
+ Helper.log.info "Repairing profile '#{profile.name}'..."
24
+ profile.repair! # yes, that's all you need to repair a profile
25
+ end
26
+
27
+ Helper.log.info "Successfully repaired #{broken_profiles.count} provisioning profiles".green
28
+ end
29
+ end
30
+ end
data/lib/sigh/resign.rb CHANGED
@@ -33,7 +33,14 @@ module Sigh
33
33
  puts command.magenta
34
34
  output = `#{command}`
35
35
  puts output
36
- if output.include?('Assuming Distribution Identity')
36
+
37
+ if signing_identity =~ /^iPhone Developer:*/
38
+ ptn = 'Assuming Development Identity'
39
+ else
40
+ ptn = 'Assuming Distribution Identity'
41
+ end
42
+
43
+ if output.include?(ptn)
37
44
  Helper.log.info "Successfully signed #{ipa}!".green
38
45
  true
39
46
  else
@@ -86,7 +93,7 @@ module Sigh
86
93
  end
87
94
 
88
95
  def validate_provisioning_file(provisioning_profile)
89
- raise "Provisioning profile file could not be found or is not a .mobileprovision file (#{provisioning_profile})".red unless File.exists?(provisioning_profile) && provisioning_profile.end_with?('.mobileprovision')
96
+ raise "Provisioning profile file could not be found or is not a .mobileprovision file (#{provisioning_profile})".red unless File.exist?(provisioning_profile) && provisioning_profile.end_with?('.mobileprovision')
90
97
  end
91
98
 
92
99
  def print_available_identities
@@ -103,7 +110,11 @@ module Sigh
103
110
  available = `security find-identity -v -p codesigning`
104
111
  ids = []
105
112
  available.split("\n").each do |current|
106
- (ids << current.match(/.*\"(.*)\"/)[1]) rescue nil # the last line does not match
113
+ begin
114
+ (ids << current.match(/.*\"(.*)\"/)[1])
115
+ rescue
116
+ nil
117
+ end # the last line does not match
107
118
  end
108
119
 
109
120
  ids
@@ -7,38 +7,46 @@ module Sigh
7
7
  # Uses the spaceship to create or download a provisioning profile
8
8
  # returns the path the newly created provisioning profile (in /tmp usually)
9
9
  def run
10
- Helper.log.info "Starting login"
10
+ FastlaneCore::PrintTable.print_values(config: Sigh.config,
11
+ hide_keys: [],
12
+ title: "Summary for sigh #{Sigh::VERSION}")
13
+
14
+ Helper.log.info "Starting login with user '#{Sigh.config[:username]}'"
11
15
  Spaceship.login(Sigh.config[:username], nil)
12
16
  Spaceship.select_team
13
17
  Helper.log.info "Successfully logged in"
14
18
 
15
- profiles = fetch_profiles # download the profile if it's there
19
+ profiles = [] if Sigh.config[:skip_fetch_profiles]
20
+ profiles ||= fetch_profiles # download the profile if it's there
16
21
 
17
22
  if profiles.count > 0
18
23
  Helper.log.info "Found #{profiles.count} matching profile(s)".yellow
19
24
  profile = profiles.first
20
25
 
21
26
  if Sigh.config[:force]
22
- unless profile_type == Spaceship.provisioning_profile::AppStore
27
+ if profile_type == Spaceship.provisioning_profile::AppStore or profile_type == Spaceship.provisioning_profile::InHouse
28
+ Helper.log.info "Updating the provisioning profile".yellow
29
+ else
23
30
  Helper.log.info "Updating the profile to include all devices".yellow
24
31
  profile.devices = Spaceship.device.all
25
- else
26
- Helper.log.info "Updating the provisioning profile".yellow
27
32
  end
28
33
 
29
34
  profile = profile.update! # assign it, as it's a new profile
30
35
  end
31
36
  else
32
- Helper.log.info "No existing profiles found, creating a new one for you".yellow
37
+ Helper.log.info "No existing profiles, creating a new one for you".yellow
33
38
  profile = create_profile!
34
39
  end
35
40
 
36
41
  raise "Something went wrong fetching the latest profile".red unless profile
37
42
 
38
- path = download_profile(profile)
39
- store_provisioning_id_in_environment(path)
43
+ if profile_type == Spaceship.provisioning_profile.in_house
44
+ ENV["SIGH_PROFILE_ENTERPRISE"] = "1"
45
+ else
46
+ ENV.delete("SIGH_PROFILE_ENTERPRISE")
47
+ end
40
48
 
41
- return path
49
+ return download_profile(profile)
42
50
  end
43
51
 
44
52
  # The kind of provisioning profile we're interested in
@@ -46,6 +54,7 @@ module Sigh
46
54
  return @profile_type if @profile_type
47
55
 
48
56
  @profile_type = Spaceship.provisioning_profile.app_store
57
+ @profile_type = Spaceship.provisioning_profile.in_house if Spaceship.client.in_house?
49
58
  @profile_type = Spaceship.provisioning_profile.ad_hoc if Sigh.config[:adhoc]
50
59
  @profile_type = Spaceship.provisioning_profile.development if Sigh.config[:development]
51
60
 
@@ -54,7 +63,28 @@ module Sigh
54
63
 
55
64
  # Fetches a profile matching the user's search requirements
56
65
  def fetch_profiles
57
- profile_type.find_by_bundle_id(Sigh.config[:app_identifier])
66
+ Helper.log.info "Fetching profiles..."
67
+ results = profile_type.find_by_bundle_id(Sigh.config[:app_identifier]).find_all(&:valid?)
68
+
69
+ # Take the provisioning profile name into account
70
+ if Sigh.config[:provisioning_name].to_s.length > 0
71
+ filtered = results.select { |p| p.name.strip == Sigh.config[:provisioning_name].strip }
72
+ results = filtered if (filtered || []).count > 0
73
+ end
74
+
75
+ return results if Sigh.config[:skip_certificate_verification]
76
+
77
+ return results.find_all do |a|
78
+ # Also make sure we have the certificate installed on the local machine
79
+ installed = false
80
+ a.certificates.each do |cert|
81
+ file = Tempfile.new('cert')
82
+ file.write(cert.download_raw)
83
+ file.close
84
+ installed = true if FastlaneCore::CertChecker.installed?(file.path)
85
+ end
86
+ installed
87
+ end
58
88
  end
59
89
 
60
90
  # Create a new profile and return it
@@ -63,9 +93,11 @@ module Sigh
63
93
  bundle_id = Sigh.config[:app_identifier]
64
94
  name = Sigh.config[:provisioning_name] || [bundle_id, profile_type.pretty_type].join(' ')
65
95
 
66
- if Spaceship.provisioning_profile.all.find { |p| p.name == name }
67
- Helper.log.error "The name '#{name}' is already taken, using another one."
68
- name += " #{Time.now.to_i}"
96
+ unless Sigh.config[:skip_fetch_profiles]
97
+ if Spaceship.provisioning_profile.all.find { |p| p.name == name }
98
+ Helper.log.error "The name '#{name}' is already taken, using another one."
99
+ name += " #{Time.now.to_i}"
100
+ end
69
101
  end
70
102
 
71
103
  Helper.log.info "Creating new provisioning profile for '#{Sigh.config[:app_identifier]}' with name '#{name}'".yellow
@@ -75,11 +107,13 @@ module Sigh
75
107
  profile
76
108
  end
77
109
 
78
-
79
110
  # Certificate to use based on the current distribution mode
111
+ # rubocop:disable Metrics/AbcSize
80
112
  def certificate_to_use
81
113
  if profile_type == Spaceship.provisioning_profile.Development
82
114
  certificates = Spaceship.certificate.development.all
115
+ elsif profile_type == Spaceship.provisioning_profile.InHouse
116
+ certificates = Spaceship.certificate.in_house.all
83
117
  else
84
118
  certificates = Spaceship.certificate.production.all # Ad hoc or App Store
85
119
  end
@@ -97,11 +131,12 @@ module Sigh
97
131
  true
98
132
  end
99
133
 
100
- if certificates.count > 1
134
+ if certificates.count > 1 and !Sigh.config[:development]
101
135
  Helper.log.info "Found more than one code signing identity. Choosing the first one. Check out `sigh --help` to see all available options.".yellow
102
136
  Helper.log.info "Available Code Signing Identities for current filters:".green
103
137
  certificates.each do |c|
104
- Helper.log.info ("\t- Name: " + c.owner_name + " - ID: " + c.id + " - Expires: " + c.expires.strftime("%d/%m/%Y")).green
138
+ str = ["\t- Name:", c.owner_name, "- ID:", c.id + "- Expires", c.expires.strftime("%d/%m/%Y")].join(" ")
139
+ Helper.log.info str.green
105
140
  end
106
141
  end
107
142
 
@@ -113,29 +148,24 @@ module Sigh
113
148
  raise "Could not find a matching code signing identity for #{profile_type}. You can use cert to generate one (https://github.com/fastlane/cert)".red
114
149
  end
115
150
 
151
+ return certificates if Sigh.config[:development] # development profiles support multiple certificates
116
152
  return certificates.first
117
153
  end
154
+ # rubocop:enable Metrics/AbcSize
118
155
 
119
156
  # Downloads and stores the provisioning profile
120
157
  def download_profile(profile)
121
158
  Helper.log.info "Downloading provisioning profile...".yellow
122
159
  profile_name ||= "#{profile.class.pretty_type}_#{Sigh.config[:app_identifier]}.mobileprovision" # default name
123
- profile_name += '.mobileprovision' unless profile_name.include?'mobileprovision'
160
+ profile_name += '.mobileprovision' unless profile_name.include? 'mobileprovision'
124
161
 
125
162
  output_path = File.join('/tmp', profile_name)
126
- dataWritten = File.open(output_path, "wb") do |f|
163
+ File.open(output_path, "wb") do |f|
127
164
  f.write(profile.download)
128
165
  end
129
166
 
130
167
  Helper.log.info "Successfully downloaded provisioning profile...".green
131
168
  return output_path
132
169
  end
133
-
134
- # Store the profile ID into the environment
135
- def store_provisioning_id_in_environment(path)
136
- require 'sigh/profile_analyser'
137
- udid = Sigh::ProfileAnalyser.run(path)
138
- ENV["SIGH_UDID"] = udid if udid
139
- end
140
170
  end
141
171
  end
data/lib/sigh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sigh
2
- VERSION = "1.0.0.beta6"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,155 +1,189 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sigh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta6
4
+ version: 1.0.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: 2015-06-04 00:00:00.000000000 Z
11
+ date: 2015-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.6
19
+ version: 0.19.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 1.0.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - '>='
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 0.19.0
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: 0.7.6
32
+ version: 1.0.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: plist
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - ~>
37
+ - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: 3.1.0
39
+ version: '3.1'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - ~>
44
+ - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: 3.1.0
46
+ version: '3.1'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: spaceship
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - '>='
51
+ - - ">="
46
52
  - !ruby/object:Gem::Version
47
- version: 0.0.6
53
+ version: 0.11.2
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - '>='
58
+ - - ">="
53
59
  - !ruby/object:Gem::Version
54
- version: 0.0.6
60
+ version: 0.11.2
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: bundler
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
- - - '>='
65
+ - - ">="
60
66
  - !ruby/object:Gem::Version
61
67
  version: '0'
62
68
  type: :development
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
- - - '>='
72
+ - - ">="
67
73
  - !ruby/object:Gem::Version
68
74
  version: '0'
69
75
  - !ruby/object:Gem::Dependency
70
76
  name: rake
71
77
  requirement: !ruby/object:Gem::Requirement
72
78
  requirements:
73
- - - '>='
79
+ - - ">="
74
80
  - !ruby/object:Gem::Version
75
81
  version: '0'
76
82
  type: :development
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
- - - '>='
86
+ - - ">="
81
87
  - !ruby/object:Gem::Version
82
88
  version: '0'
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: rspec
85
91
  requirement: !ruby/object:Gem::Requirement
86
92
  requirements:
87
- - - ~>
93
+ - - "~>"
88
94
  - !ruby/object:Gem::Version
89
95
  version: 3.1.0
90
96
  type: :development
91
97
  prerelease: false
92
98
  version_requirements: !ruby/object:Gem::Requirement
93
99
  requirements:
94
- - - ~>
100
+ - - "~>"
95
101
  - !ruby/object:Gem::Version
96
102
  version: 3.1.0
97
103
  - !ruby/object:Gem::Dependency
98
104
  name: pry
99
105
  requirement: !ruby/object:Gem::Requirement
100
106
  requirements:
101
- - - '>='
107
+ - - ">="
102
108
  - !ruby/object:Gem::Version
103
109
  version: '0'
104
110
  type: :development
105
111
  prerelease: false
106
112
  version_requirements: !ruby/object:Gem::Requirement
107
113
  requirements:
108
- - - '>='
114
+ - - ">="
109
115
  - !ruby/object:Gem::Version
110
116
  version: '0'
111
117
  - !ruby/object:Gem::Dependency
112
118
  name: yard
113
119
  requirement: !ruby/object:Gem::Requirement
114
120
  requirements:
115
- - - ~>
121
+ - - "~>"
116
122
  - !ruby/object:Gem::Version
117
123
  version: 0.8.7.4
118
124
  type: :development
119
125
  prerelease: false
120
126
  version_requirements: !ruby/object:Gem::Requirement
121
127
  requirements:
122
- - - ~>
128
+ - - "~>"
123
129
  - !ruby/object:Gem::Version
124
130
  version: 0.8.7.4
125
131
  - !ruby/object:Gem::Dependency
126
132
  name: webmock
127
133
  requirement: !ruby/object:Gem::Requirement
128
134
  requirements:
129
- - - ~>
135
+ - - "~>"
130
136
  - !ruby/object:Gem::Version
131
137
  version: 1.19.0
132
138
  type: :development
133
139
  prerelease: false
134
140
  version_requirements: !ruby/object:Gem::Requirement
135
141
  requirements:
136
- - - ~>
142
+ - - "~>"
137
143
  - !ruby/object:Gem::Version
138
144
  version: 1.19.0
139
145
  - !ruby/object:Gem::Dependency
140
- name: codeclimate-test-reporter
146
+ name: coveralls
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: fastlane
141
161
  requirement: !ruby/object:Gem::Requirement
142
162
  requirements:
143
- - - '>='
163
+ - - ">="
144
164
  - !ruby/object:Gem::Version
145
165
  version: '0'
146
166
  type: :development
147
167
  prerelease: false
148
168
  version_requirements: !ruby/object:Gem::Requirement
149
169
  requirements:
150
- - - '>='
170
+ - - ">="
151
171
  - !ruby/object:Gem::Version
152
172
  version: '0'
173
+ - !ruby/object:Gem::Dependency
174
+ name: rubocop
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: '0.34'
180
+ type: :development
181
+ prerelease: false
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - "~>"
185
+ - !ruby/object:Gem::Version
186
+ version: '0.34'
153
187
  description: Because you would rather spend your time building stuff than fighting
154
188
  provisioning
155
189
  email:
@@ -164,13 +198,13 @@ files:
164
198
  - bin/sigh
165
199
  - lib/assets/resign.sh
166
200
  - lib/sigh.rb
167
- - lib/sigh/dependency_checker.rb
201
+ - lib/sigh/download_all.rb
168
202
  - lib/sigh/local_manage.rb
169
203
  - lib/sigh/manager.rb
170
204
  - lib/sigh/options.rb
171
- - lib/sigh/profile_analyser.rb
205
+ - lib/sigh/repair.rb
172
206
  - lib/sigh/resign.rb
173
- - lib/sigh/spaceship/runner.rb
207
+ - lib/sigh/runner.rb
174
208
  - lib/sigh/version.rb
175
209
  homepage: https://fastlane.tools
176
210
  licenses:
@@ -182,17 +216,17 @@ require_paths:
182
216
  - lib
183
217
  required_ruby_version: !ruby/object:Gem::Requirement
184
218
  requirements:
185
- - - '>='
219
+ - - ">="
186
220
  - !ruby/object:Gem::Version
187
221
  version: 2.0.0
188
222
  required_rubygems_version: !ruby/object:Gem::Requirement
189
223
  requirements:
190
- - - '>'
224
+ - - ">="
191
225
  - !ruby/object:Gem::Version
192
- version: 1.3.1
226
+ version: '0'
193
227
  requirements: []
194
228
  rubyforge_project:
195
- rubygems_version: 2.4.7
229
+ rubygems_version: 2.4.5
196
230
  signing_key:
197
231
  specification_version: 4
198
232
  summary: Because you would rather spend your time building stuff than fighting provisioning
@@ -1,18 +0,0 @@
1
- module Sigh
2
- class DependencyChecker
3
- def self.check_dependencies
4
- self.check_xcode_select unless Helper.is_test?
5
- end
6
-
7
- def self.check_xcode_select
8
- unless `xcode-select -v`.include?"xcode-select version "
9
- Helper.log.fatal '#############################################################'
10
- Helper.log.fatal "# You have to install the Xcode commdand line tools to use sigh"
11
- Helper.log.fatal "# Install the latest version of Xcode from the AppStore"
12
- Helper.log.fatal "# Run xcode-select --install to install the developer tools"
13
- Helper.log.fatal '#############################################################'
14
- raise "Run 'xcode-select --install' and start sigh again"
15
- end
16
- end
17
- end
18
- end
@@ -1,15 +0,0 @@
1
- require 'plist'
2
-
3
- module Sigh
4
- class ProfileAnalyser
5
- def self.run(path)
6
- plist = Plist::parse_xml(`security cms -D -i '#{path}'`)
7
- if plist.count > 10
8
- Helper.log.info("Provisioning profile of app '#{plist['AppIDName']}' with the name '#{plist['Name']}' successfully analysed.".green)
9
- return plist["UUID"]
10
- else
11
- Helper.log.error("Error parsing provisioning profile at path '#{path}'".red)
12
- end
13
- end
14
- end
15
- end