cert 1.1.0 → 1.2.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: ebbcfdb1bab4667d4f36ecc59d37cb4ae5f0a481
4
- data.tar.gz: eec2ad460fcfcbf707c646d3daa47b666ad9b112
3
+ metadata.gz: 5efc414ed0be1915aa432f027ce056b0ef1dce53
4
+ data.tar.gz: b531b27789788d0e97a77346cc621bb3a564473c
5
5
  SHA512:
6
- metadata.gz: c2b7b1d57cf9b166c03f84947d4b0709758a2a67949711aef067a15cb63c57922978a0f7ec154560274c4f076165ead9ab6d48a6deaa5e8dfc7d5e304fdb87d2
7
- data.tar.gz: fedcccfdd3ecaaab5b48369a792e326c284cc986f5c0aa3270f8ff4e49376b171945db37614b81d86d956f42d7cc8b5b9e53e5131d8829d96d5e8679bd70403e
6
+ metadata.gz: de19b2a4c1ae6b1ddbab567f0769e4ecf0ff482168866220e6e6abd3691906d1e824fdf548d8df83cce5f4fd2aea7d39b890c96adcbf79dfbd21e9d6779d2024
7
+ data.tar.gz: 9a82b8b1c5145367b14ce80665337eccd91009066dcf5122a34f963ab2aec7dd27887350d9293c8fb89cec9dcfc21c16f7e7f9c4ad93362300d6b82be05f51df
data/README.md CHANGED
@@ -1,17 +1,17 @@
1
1
  <h3 align="center">
2
- <a href="https://github.com/KrauseFx/fastlane">
2
+ <a href="https://github.com/fastlane/fastlane">
3
3
  <img src="assets/fastlane.png" width="150" />
4
4
  <br />
5
5
  fastlane
6
6
  </a>
7
7
  </h3>
8
8
  <p align="center">
9
- <a href="https://github.com/KrauseFx/deliver">deliver</a> &bull;
10
- <a href="https://github.com/KrauseFx/snapshot">snapshot</a> &bull;
11
- <a href="https://github.com/KrauseFx/frameit">frameit</a> &bull;
12
- <a href="https://github.com/KrauseFx/PEM">PEM</a> &bull;
13
- <a href="https://github.com/KrauseFx/sigh">sigh</a> &bull;
14
- <a href="https://github.com/KrauseFx/produce">produce</a> &bull;
9
+ <a href="https://github.com/fastlane/deliver">deliver</a> &bull;
10
+ <a href="https://github.com/fastlane/snapshot">snapshot</a> &bull;
11
+ <a href="https://github.com/fastlane/frameit">frameit</a> &bull;
12
+ <a href="https://github.com/fastlane/PEM">PEM</a> &bull;
13
+ <a href="https://github.com/fastlane/sigh">sigh</a> &bull;
14
+ <a href="https://github.com/fastlane/produce">produce</a> &bull;
15
15
  <b>cert</b> &bull;
16
16
  <a href="https://github.com/fastlane/spaceship">spaceship</a> &bull;
17
17
  <a href="https://github.com/fastlane/pilot">pilot</a> &bull;
@@ -29,7 +29,7 @@ cert
29
29
  ============
30
30
 
31
31
  [![Twitter: @KauseFx](https://img.shields.io/badge/contact-@KrauseFx-blue.svg?style=flat)](https://twitter.com/KrauseFx)
32
- [![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/KrauseFx/cert/blob/master/LICENSE)
32
+ [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/KrauseFx/cert/blob/master/LICENSE)
33
33
  [![Gem](https://img.shields.io/gem/v/cert.svg?style=flat)](http://rubygems.org/gems/cert)
34
34
 
35
35
  ###### Automatically create and maintain iOS code signing certificates.
@@ -61,9 +61,9 @@ Make sure, you have the latest version of the Xcode command line tools installed
61
61
 
62
62
  # Why?
63
63
 
64
- Please check out [this guide](https://github.com/KrauseFx/cert/blob/master/ManualSteps.md) which shows how to manually create an iOS code signing profile and a provisioning profile using the Apple Developer Portal.
64
+ Please check out [this guide](https://github.com/fastlane/cert/blob/master/ManualSteps.md) which shows how to manually create an iOS code signing profile and a provisioning profile using the Apple Developer Portal.
65
65
 
66
- **After** checking out the [guide](https://github.com/KrauseFx/cert/blob/master/ManualSteps.md), take a look how `cert` and [`sigh`](https://github.com/KrauseFx/sigh) do all that for you.
66
+ **After** checking out the [guide](https://github.com/fastlane/cert/blob/master/ManualSteps.md), take a look how `cert` and [`sigh`](https://github.com/fastlane/sigh) do all that for you.
67
67
 
68
68
  ![assets/cert.gif](assets/cert.gif)
69
69
 
@@ -102,9 +102,9 @@ Keep in mind, there is no way for `cert` to download existing certificates + pri
102
102
 
103
103
  Run `cert --help` to get a list of all available environment variables.
104
104
 
105
- ## Use with [`sigh`](https://github.com/KrauseFx/sigh)
105
+ ## Use with [`sigh`](https://github.com/fastlane/sigh)
106
106
 
107
- `cert` becomes really interesting when used in [`fastlane`](https://github.com/KrauseFx/fastlane) in combination with [`sigh`](https://github.com/KrauseFx/sigh).
107
+ `cert` becomes really interesting when used in [`fastlane`](https://github.com/fastlane/fastlane) in combination with [`sigh`](https://github.com/fastlane/sigh).
108
108
 
109
109
  Update your `Fastfile` to contain the following code:
110
110
 
@@ -120,19 +120,19 @@ This will result in `sigh` always using the correct signing certificate, which i
120
120
 
121
121
 
122
122
  ## How is my password stored?
123
- `cert` uses the [password manager](https://github.com/fastlane/CredentialsManager) from `fastlane`. Take a look the [CredentialsManager README](https://github.com/fastlane/CredentialsManager) for more information.
123
+ `cert` uses the [password manager](https://github.com/fastlane/credentials_manager) from `fastlane`. Take a look the [CredentialsManager README](https://github.com/fastlane/credentials_manager) for more information.
124
124
 
125
125
  # Tips
126
126
 
127
127
  ## [`fastlane`](https://fastlane.tools) Toolchain
128
128
 
129
129
  - [`fastlane`](https://fastlane.tools): Connect all deployment tools into one streamlined workflow
130
- - [`deliver`](https://github.com/KrauseFx/deliver): Upload screenshots, metadata and your app to the App Store
131
- - [`snapshot`](https://github.com/KrauseFx/snapshot): Automate taking localized screenshots of your iOS app on every device
132
- - [`frameit`](https://github.com/KrauseFx/frameit): Quickly put your screenshots into the right device frames
133
- - [`PEM`](https://github.com/KrauseFx/pem): Automatically generate and renew your push notification profiles
134
- - [`sigh`](https://github.com/KrauseFx/sigh): Because you would rather spend your time building stuff than fighting provisioning
135
- - [`produce`](https://github.com/KrauseFx/produce): Create new iOS apps on iTunes Connect and Dev Portal using the command line
130
+ - [`deliver`](https://github.com/fastlane/deliver): Upload screenshots, metadata and your app to the App Store
131
+ - [`snapshot`](https://github.com/fastlane/snapshot): Automate taking localized screenshots of your iOS app on every device
132
+ - [`frameit`](https://github.com/fastlane/frameit): Quickly put your screenshots into the right device frames
133
+ - [`PEM`](https://github.com/fastlane/PEM): Automatically generate and renew your push notification profiles
134
+ - [`sigh`](https://github.com/fastlane/sigh): Because you would rather spend your time building stuff than fighting provisioning
135
+ - [`produce`](https://github.com/fastlane/produce): Create new iOS apps on iTunes Connect and Dev Portal using the command line
136
136
  - [`spaceship`](https://github.com/fastlane/spaceship): Ruby library to access the Apple Dev Center and iTunes Connect
137
137
  - [`pilot`](https://github.com/fastlane/pilot): The best way to manage your TestFlight testers and builds from your terminal
138
138
  - [`boarding`](https://github.com/fastlane/boarding): The easiest way to invite your TestFlight beta testers
data/lib/cert/options.rb CHANGED
@@ -10,6 +10,11 @@ module Cert
10
10
  description: "Create a development certificate instead of a distribution one",
11
11
  is_string: false,
12
12
  default_value: false),
13
+ FastlaneCore::ConfigItem.new(key: :force,
14
+ env_name: "CERT_FORCE",
15
+ description: "Create a certificate even if an existing certificate exists",
16
+ is_string: false,
17
+ default_value: false),
13
18
  FastlaneCore::ConfigItem.new(key: :username,
14
19
  short_option: "-u",
15
20
  env_name: "CERT_USERNAME",
data/lib/cert/runner.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'fileutils'
2
+
1
3
  module Cert
2
4
  class Runner
3
5
  def launch
@@ -8,6 +10,8 @@ module Cert
8
10
  end
9
11
 
10
12
  def run
13
+ FileUtils.mkdir_p(Cert.config[:output_path])
14
+
11
15
  FastlaneCore::PrintTable.print_values(config: Cert.config, hide_keys: [], title: "Summary for cert #{Cert::VERSION}")
12
16
 
13
17
  Helper.log.info "Starting login with user '#{Cert.config[:username]}'"
@@ -15,9 +19,8 @@ module Cert
15
19
  Spaceship.select_team
16
20
  Helper.log.info "Successfully logged in"
17
21
 
18
- if find_existing_cert
19
- return # success
20
- else
22
+ cert_path = find_existing_cert
23
+ if cert_path.nil? || Cert.config[:force]
21
24
  if create_certificate # no certificate here, creating a new one
22
25
  return # success
23
26
  else
@@ -74,9 +77,9 @@ module Cert
74
77
  end
75
78
 
76
79
  # Store all that onto the filesystem
77
- request_path = File.join(Cert.config[:output_path], 'CertCertificateSigningRequest.certSigningRequest')
80
+ request_path = File.expand_path(File.join(Cert.config[:output_path], 'CertCertificateSigningRequest.certSigningRequest'))
78
81
  File.write(request_path, csr.to_pem)
79
- private_key_path = File.join(Cert.config[:output_path], 'private_key.p12')
82
+ private_key_path = File.expand_path(File.join(Cert.config[:output_path], 'private_key.p12'))
80
83
  File.write(private_key_path, pkey)
81
84
  cert_path = store_certificate(certificate)
82
85
 
@@ -94,7 +97,7 @@ module Cert
94
97
  end
95
98
 
96
99
  def store_certificate(certificate)
97
- path = File.join(Cert.config[:output_path], "#{certificate.id}.cer")
100
+ path = File.expand_path(File.join(Cert.config[:output_path], "#{certificate.id}.cer"))
98
101
  raw_data = certificate.download_raw
99
102
  File.write(path, raw_data)
100
103
  return path
data/lib/cert/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cert
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
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.1.0
4
+ version: 1.2.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-10-27 00:00:00.000000000 Z
11
+ date: 2015-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core