fastlane-plugin-certificate_expirydate 0.1.1 → 0.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76766a692c59f0de68c6b67e59e035ad61db1306
|
4
|
+
data.tar.gz: 8188afac18bcf759bb58044c75782449520c0cdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8770b5e87892e37e1567b7eef6e105382bab9d2601af78560650b33bf605c01898ff05975be0b0c2fe4913f9dd2e1b9371f49bec195fd32303da754f62f99c5a
|
7
|
+
data.tar.gz: 28856e11f4c0d071e1d5f71094fc0d01a44be388873bc1002ee64f7c59cf3d2083357519725fe7e5a0a37ccfbf2fe4effafe081429e5ae4cca9130e786321a2d
|
@@ -6,8 +6,10 @@ module Fastlane
|
|
6
6
|
certificate_pem_file = File.join("/tmp", "#{certificate_basename}.pem")
|
7
7
|
File.delete(certificate_pem_file) if File.exist?(certificate_pem_file)
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
result = sh("openssl pkcs12 -in #{params[:certificate_filepath].shellescape} -out #{certificate_pem_file} -nodes -password pass:#{params[:certificate_password].shellescape}")
|
10
|
+
UI.user_error!("Invalid password provided to get the expiry date of the certificate") if /Mac verify error: invalid password\?/ =~ result
|
11
|
+
|
12
|
+
expirydate_string = sh("cat #{certificate_pem_file} | openssl x509 -noout -enddate")[/notAfter=(.*)/, 1]
|
11
13
|
|
12
14
|
DateTime.parse(expirydate_string)
|
13
15
|
end
|
@@ -28,7 +30,7 @@ module Fastlane
|
|
28
30
|
optional: false,
|
29
31
|
type: String,
|
30
32
|
verify_block: proc do |value|
|
31
|
-
UI.user_error!("Invalid or empty certificate filepath given to CertificateExpirydateAction. Pass using `certificate_filepath: 'path/to/certificate_file'`") if
|
33
|
+
UI.user_error!("Invalid or empty certificate filepath given to CertificateExpirydateAction. Pass using `certificate_filepath: 'path/to/certificate_file'`") if value.nil? || value.empty?
|
32
34
|
UI.user_error!("Non-existant certificate file for CertificateExpirydateAction given") unless File.exist?(value)
|
33
35
|
end),
|
34
36
|
FastlaneCore::ConfigItem.new(key: :certificate_password,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-certificate_expirydate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lyndsey Ferguson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -106,7 +106,7 @@ files:
|
|
106
106
|
- lib/fastlane/plugin/certificate_expirydate.rb
|
107
107
|
- README.md
|
108
108
|
- LICENSE
|
109
|
-
homepage: https://github.com/lyndsey-ferguson/fastlane_plugins/
|
109
|
+
homepage: https://github.com/lyndsey-ferguson/fastlane_plugins/
|
110
110
|
licenses:
|
111
111
|
- MIT
|
112
112
|
metadata: {}
|