cert 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/bin/cert +2 -0
- data/lib/cert/keychain_importer.rb +3 -3
- data/lib/cert/options.rb +1 -1
- data/lib/cert/runner.rb +12 -10
- data/lib/cert/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 714f76d328ab06cf34b40ce8f3d97fa772be8981
|
4
|
+
data.tar.gz: 521e125d30b81831df122d9706ba275675ec64fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87860072cd460b853c8079255a2a30dac9ec3cc5197baa9821c2cf913e8911b60d1808cea9201ec9dd919d77c10179e078d4274c629ef9da2462f64077b6d984
|
7
|
+
data.tar.gz: 7481ffb4c7669121d71a49a73853aa0c7b95977b19ddf8dacf43a8396bdc3494c1cdeb2a48b669893db931c58b18b42862d716a09d73624fb340dbe41388ded4
|
data/README.md
CHANGED
@@ -54,6 +54,9 @@ Get in contact with the developers on Twitter: [@FastlaneTools](https://twitter.
|
|
54
54
|
|
55
55
|
|
56
56
|
# Installation
|
57
|
+
|
58
|
+
**Note**: It is recommended to use [match](https://github.com/fastlane/match) according to the [codesigning.guide](https://codesigning.guide) for generating and maintaining your certificates. Use `cert` directly only if you want full control over what's going on and know more about codesigning.
|
59
|
+
|
57
60
|
sudo gem install cert
|
58
61
|
|
59
62
|
Make sure, you have the latest version of the Xcode command line tools installed:
|
@@ -86,7 +89,7 @@ Only if a new certificate needs to be created, `cert` will
|
|
86
89
|
- Import all the generated files into your Keychain
|
87
90
|
|
88
91
|
|
89
|
-
|
92
|
+
`cert` will never revoke your existing certificates. If you can't create any more certificates, `cert` will raise an exception, which means, you have to revoke one of the existing certificates to make room for a new one.
|
90
93
|
|
91
94
|
|
92
95
|
You can pass your Apple ID:
|
@@ -149,6 +152,9 @@ Download and install the [Provisioning Plugin](https://github.com/chockenberry/P
|
|
149
152
|
# Need help?
|
150
153
|
Please submit an issue on GitHub and provide information about your setup
|
151
154
|
|
155
|
+
# Code of Conduct
|
156
|
+
Help us keep `cert` open and inclusive. Please read and follow our [Code of Conduct](https://github.com/fastlane/code-of-conduct).
|
157
|
+
|
152
158
|
# License
|
153
159
|
This project is licensed under the terms of the MIT license. See the LICENSE file.
|
154
160
|
|
data/bin/cert
CHANGED
@@ -20,6 +20,8 @@ class CertApplication
|
|
20
20
|
program :help, 'GitHub', 'https://github.com/fastlane/cert'
|
21
21
|
program :help_formatter, :compact
|
22
22
|
|
23
|
+
global_option('--verbose') { $verbose = true }
|
24
|
+
|
23
25
|
FastlaneCore::CommanderGenerator.new.generate(Cert::Options.available_options)
|
24
26
|
|
25
27
|
command :create do |c|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
module Cert
|
2
2
|
class KeychainImporter
|
3
3
|
def self.import_file(path)
|
4
|
-
|
4
|
+
UI.user_error!("Could not find file '#{path}'") unless File.exist?(path)
|
5
5
|
keychain = File.expand_path(Cert.config[:keychain_path])
|
6
6
|
|
7
7
|
command = "security import #{path.shellescape} -k '#{keychain}'"
|
8
8
|
command << " -T /usr/bin/codesign" # to not be asked for permission when running a tool like `gym`
|
9
9
|
command << " -T /usr/bin/security"
|
10
|
-
|
11
|
-
Helper.
|
10
|
+
|
11
|
+
Helper.backticks(command)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
data/lib/cert/options.rb
CHANGED
@@ -53,7 +53,7 @@ module Cert
|
|
53
53
|
default_value: Dir["#{Dir.home}/Library/Keychains/login.keychain"].last,
|
54
54
|
verify_block: proc do |value|
|
55
55
|
value = File.expand_path(value)
|
56
|
-
|
56
|
+
UI.user_error!("Keychain not found at path '#{value}'") unless File.exist?(value)
|
57
57
|
end)
|
58
58
|
]
|
59
59
|
end
|
data/lib/cert/runner.rb
CHANGED
@@ -6,7 +6,9 @@ module Cert
|
|
6
6
|
run
|
7
7
|
|
8
8
|
installed = FastlaneCore::CertChecker.installed?(ENV["CER_FILE_PATH"])
|
9
|
-
|
9
|
+
UI.message "Verifying the certificated is properly installed locally..."
|
10
|
+
UI.user_error!("Could not find the newly generated certificate installed") unless installed
|
11
|
+
UI.success "Successfully installed certificate #{ENV['CER_CERTIFICATE_ID']}"
|
10
12
|
return ENV["CER_FILE_PATH"]
|
11
13
|
end
|
12
14
|
|
@@ -15,10 +17,10 @@ module Cert
|
|
15
17
|
|
16
18
|
FastlaneCore::PrintTable.print_values(config: Cert.config, hide_keys: [:output_path], title: "Summary for cert #{Cert::VERSION}")
|
17
19
|
|
18
|
-
|
20
|
+
UI.message "Starting login with user '#{Cert.config[:username]}'"
|
19
21
|
Spaceship.login(Cert.config[:username], nil)
|
20
22
|
Spaceship.select_team
|
21
|
-
|
23
|
+
UI.message "Successfully logged in"
|
22
24
|
|
23
25
|
should_create = Cert.config[:force]
|
24
26
|
unless should_create
|
@@ -31,7 +33,7 @@ module Cert
|
|
31
33
|
if create_certificate # no certificate here, creating a new one
|
32
34
|
return # success
|
33
35
|
else
|
34
|
-
|
36
|
+
UI.user_error!("Something went wrong when trying to create a new certificate...")
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
@@ -49,7 +51,7 @@ module Cert
|
|
49
51
|
ENV["CER_CERTIFICATE_ID"] = certificate.id
|
50
52
|
ENV["CER_FILE_PATH"] = path
|
51
53
|
|
52
|
-
|
54
|
+
UI.success "Found the certificate #{certificate.id} (#{certificate.name}) which is installed on the local machine. Using this one."
|
53
55
|
|
54
56
|
return path
|
55
57
|
elsif File.exist?(private_key_path)
|
@@ -59,17 +61,17 @@ module Cert
|
|
59
61
|
ENV["CER_CERTIFICATE_ID"] = certificate.id
|
60
62
|
ENV["CER_FILE_PATH"] = path
|
61
63
|
|
62
|
-
|
64
|
+
UI.success "Found the cached certificate #{certificate.id} (#{certificate.name}). Using this one."
|
63
65
|
|
64
66
|
return path
|
65
67
|
else
|
66
|
-
|
68
|
+
UI.error "Certificate #{certificate.id} (#{certificate.name}) can't be found on your local computer"
|
67
69
|
end
|
68
70
|
|
69
71
|
File.delete(path) # as apparantly this certificate is pretty useless without a private key
|
70
72
|
end
|
71
73
|
|
72
|
-
|
74
|
+
UI.important "Couldn't find an existing certificate... creating a new one"
|
73
75
|
return nil
|
74
76
|
end
|
75
77
|
|
@@ -96,7 +98,7 @@ module Cert
|
|
96
98
|
certificate = certificate_type.create!(csr: csr)
|
97
99
|
rescue => ex
|
98
100
|
if ex.to_s.include?("You already have a current")
|
99
|
-
|
101
|
+
UI.user_error!("Could not create another certificate, reached the maximum number of available certificates.")
|
100
102
|
end
|
101
103
|
|
102
104
|
raise ex
|
@@ -120,7 +122,7 @@ module Cert
|
|
120
122
|
ENV["CER_CERTIFICATE_ID"] = certificate.id
|
121
123
|
ENV["CER_FILE_PATH"] = cert_path
|
122
124
|
|
123
|
-
|
125
|
+
UI.success "Successfully generated #{certificate.id} which was imported to the local machine."
|
124
126
|
|
125
127
|
return cert_path
|
126
128
|
end
|
data/lib/cert/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.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-
|
11
|
+
date: 2016-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|
@@ -168,14 +168,14 @@ dependencies:
|
|
168
168
|
requirements:
|
169
169
|
- - "~>"
|
170
170
|
- !ruby/object:Gem::Version
|
171
|
-
version:
|
171
|
+
version: 0.35.1
|
172
172
|
type: :development
|
173
173
|
prerelease: false
|
174
174
|
version_requirements: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
176
|
- - "~>"
|
177
177
|
- !ruby/object:Gem::Version
|
178
|
-
version:
|
178
|
+
version: 0.35.1
|
179
179
|
description: Create new iOS code signing certificates
|
180
180
|
email:
|
181
181
|
- cert@krausefx.com
|