sigh 1.10.4 → 1.11.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: 8aa01e7a947422507dd3f858800eba9cd0f50c73
4
- data.tar.gz: 38fb2f1dcab67eedc8dabf8d37c838492b72ce93
3
+ metadata.gz: 1f8bf945e6f124b2057a6bf0a56ee479cd592b3f
4
+ data.tar.gz: c041215ae373aabb2e70891c13ba04f93bfa8526
5
5
  SHA512:
6
- metadata.gz: c7a8f04d302c951ab58507743781158003c56e1b42e947eaaa07814898bc1ede7da9b96754c6b8174ac313a89d734777cd57f7c239e91cc5fab81699a2140005
7
- data.tar.gz: 9a9e479c13649495a62c42d15e5adbbf100f382dcd553d8cde603d1b3a609c0ac0a9f231a507a4fe6aa17efbeaa0bb88b3f3c8e6c6c399cf861c9a7b65b247ef
6
+ metadata.gz: fab486554031b17e10e1b3dacf9206a0af0100b244574bb6517eacebebf921cca606a5a2ee7589f78c4a4ab217ca8bb8a4efb9632ed000ac17b2d45449d248cf
7
+ data.tar.gz: 2459cec1d1778be2a87cdd75129c83576fe631461ccc38672d21b9c0ce866c85c5d85e866d513425f3eb955941980af03c6497216d7067b8cf2a73950f1d431b
@@ -30,7 +30,29 @@ module Sigh
30
30
  c.description = 'Renews the certificate (in case it expired) and outputs the path to the generated file'
31
31
 
32
32
  c.action do |args, options|
33
- Sigh.config = FastlaneCore::Configuration.create(Sigh::Options.available_options, options.__hash__)
33
+ user_input = options.__hash__
34
+
35
+ # The user might run sigh using
36
+ #
37
+ # sigh development
38
+ #
39
+ # sigh adhoc -u user@krausefx.com
40
+ #
41
+ # When the user runs this, it will use :development
42
+ #
43
+ # sigh development --adhoc
44
+ #
45
+ case args.first
46
+ when "development"
47
+ user_input[:development] = true
48
+ user_input.delete(:adhoc)
49
+ when "adhoc"
50
+ user_input[:adhoc] = true
51
+ user_input.delete(:development)
52
+ end
53
+
54
+ Sigh.config = FastlaneCore::Configuration.create(Sigh::Options.available_options, user_input)
55
+
34
56
  Sigh::Manager.start
35
57
  end
36
58
  end
@@ -12,16 +12,24 @@ module Sigh
12
12
  env_name: "SIGH_AD_HOC",
13
13
  description: "Setting this flag will generate AdHoc profiles instead of App Store Profiles",
14
14
  is_string: false,
15
- default_value: false),
16
- FastlaneCore::ConfigItem.new(key: :skip_install,
17
- env_name: "SIGH_SKIP_INSTALL",
18
- description: "By default, the certificate will be added on your local machine. Setting this flag will skip this action",
19
- is_string: false,
20
- default_value: false),
15
+ default_value: false,
16
+ conflicting_options: [:development],
17
+ conflict_block: proc do |value|
18
+ UI.user_error!("You can't enable both :development and :adhoc")
19
+ end),
21
20
  FastlaneCore::ConfigItem.new(key: :development,
22
21
  env_name: "SIGH_DEVELOPMENT",
23
22
  description: "Renew the development certificate instead of the production one",
24
23
  is_string: false,
24
+ default_value: false,
25
+ conflicting_options: [:adhoc],
26
+ conflict_block: proc do |value|
27
+ UI.user_error!("You can't enable both :development and :adhoc")
28
+ end),
29
+ FastlaneCore::ConfigItem.new(key: :skip_install,
30
+ env_name: "SIGH_SKIP_INSTALL",
31
+ description: "By default, the certificate will be added on your local machine. Setting this flag will skip this action",
32
+ is_string: false,
25
33
  default_value: false),
26
34
  FastlaneCore::ConfigItem.new(key: :force,
27
35
  env_name: "SIGH_FORCE",
@@ -85,6 +85,20 @@ module Sigh
85
85
  end
86
86
  end
87
87
 
88
+ # Since September 20, 2016 spaceship doesn't distinguish between AdHoc and AppStore profiles
89
+ # any more, since it requires an additional request
90
+ # Instead we only call is_adhoc? on the matching profiles to speed up spaceship
91
+
92
+ results = results.find_all do |current_profile|
93
+ if profile_type == Spaceship.provisioning_profile.ad_hoc
94
+ current_profile.is_adhoc?
95
+ elsif profile_type == Spaceship.provisioning_profile.app_store
96
+ !current_profile.is_adhoc?
97
+ else
98
+ true
99
+ end
100
+ end
101
+
88
102
  return results if Sigh.config[:skip_certificate_verification]
89
103
 
90
104
  return results.find_all do |a|
@@ -97,10 +111,10 @@ module Sigh
97
111
  if FastlaneCore::CertChecker.installed?(file.path)
98
112
  installed = true
99
113
  else
100
- UI.important("Certificate for Provisioning Profile '#{a.name}' not available locally: #{cert.id}, skipping this one...")
114
+ UI.message("Certificate for Provisioning Profile '#{a.name}' not available locally: #{cert.id}, skipping this one...")
101
115
  end
102
116
  end
103
- installed
117
+ installed && a.certificate_valid?
104
118
  end
105
119
  end
106
120
 
@@ -161,7 +175,7 @@ module Sigh
161
175
  UI.important "Found more than one code signing identity. Choosing the first one. Check out `sigh --help` to see all available options."
162
176
  UI.important "Available Code Signing Identities for current filters:"
163
177
  certificates.each do |c|
164
- str = ["\t- Name:", c.owner_name, "- ID:", c.id + "- Expires", c.expires.strftime("%d/%m/%Y")].join(" ")
178
+ str = ["\t- Name:", c.owner_name, "- ID:", c.id + " - Expires", c.expires.strftime("%d/%m/%Y")].join(" ")
165
179
  UI.message str.green
166
180
  end
167
181
  end
@@ -1,3 +1,3 @@
1
1
  module Sigh
2
- VERSION = "1.10.4"
2
+ VERSION = "1.11.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.10.4
4
+ version: 1.11.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-09-16 00:00:00.000000000 Z
11
+ date: 2016-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 0.32.4
53
+ version: 0.33.0
54
54
  - - "<"
55
55
  - !ruby/object:Gem::Version
56
56
  version: 1.0.0
@@ -60,7 +60,7 @@ dependencies:
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: 0.32.4
63
+ version: 0.33.0
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
66
  version: 1.0.0