fastlane-plugin-notarize 0.2.0 → 0.2.1

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: 7c6b2af870f602051718f4e12a3ff8f50e143de5
4
- data.tar.gz: 354fb94000dd61c23ae7d69efe5c7c8770e65daa
3
+ metadata.gz: 01bec99979e8263df14a46d03e6f6b0b482d37df
4
+ data.tar.gz: 5f3a978cf1c0522bd70c05b1bb20792e59822c44
5
5
  SHA512:
6
- metadata.gz: e617932066cfc9fedbef60f70a85da79892fe8df874d2400ab022e7012351754f4fd54869cd756e6accc0f5f8388b3231e97ff0e270b79f9c5036cb6dce4d655
7
- data.tar.gz: 76cf8459503aa0b52a3ca81d361b7745e22a2109fb46c72828c08de96609480ae0fc61997cc17607985dbad4abe913501735ff1fc0889464ecf98e291cbe341d
6
+ metadata.gz: 6d5667a5e9e6f01f0aaa6da50b44468ebf2b2650fc9b24707cf8ff28513a764a283c17d2c195cfc4b796fb1fe8544dff451150d1ccb64e956a44b30880ea6131
7
+ data.tar.gz: ee51080404be195383c213e3ebc748a44215ab147bd9e9c677395aa25853e705cc0ea25203c2099cef70c2ae0a2aacd463219b2a27fa067d9505bb8a089976d8
@@ -6,6 +6,7 @@ module Fastlane
6
6
  def self.run(params)
7
7
  package_path = params[:package]
8
8
  bundle_id = params[:bundle_id]
9
+ try_early_stapling = params[:try_early_stapling]
9
10
 
10
11
  # Compress and read bundle identifier only for .app bundle.
11
12
  compressed_package_path = nil
@@ -25,7 +26,7 @@ module Fastlane
25
26
  end
26
27
  end
27
28
 
28
- UI.user_error!('Could not read bundle identifier, provide as a parameter.') unless bundle_id
29
+ UI.user_error!('Could not read bundle identifier, provide as a parameter') unless bundle_id
29
30
 
30
31
  apple_id_account = CredentialsManager::AccountManager.new(user: params[:username])
31
32
 
@@ -53,8 +54,17 @@ module Fastlane
53
54
  while notarization_info.empty? || (notarization_info['Status'] == 'in progress')
54
55
  if notarization_info.empty?
55
56
  UI.message('Waiting to query request status')
56
- else
57
- UI.message('Request in progress, waiting to query again')
57
+ elsif try_early_stapling
58
+ UI.message('Request in progress, trying early staple')
59
+
60
+ begin
61
+ self.staple(package_path)
62
+ UI.message('Successfully notarized and early stapled package.')
63
+
64
+ return
65
+ rescue
66
+ UI.message('Early staple failed, waiting to query again')
67
+ end
58
68
  end
59
69
 
60
70
  sleep(30)
@@ -82,10 +92,7 @@ module Fastlane
82
92
  when 'success'
83
93
  UI.message('Stapling package')
84
94
 
85
- Actions.sh(
86
- "xcrun stapler staple \"#{package_path}\"",
87
- log: false
88
- )
95
+ self.staple(package_path)
89
96
 
90
97
  UI.success("Successfully notarized and stapled package#{log_suffix}")
91
98
  when 'invalid'
@@ -97,6 +104,13 @@ module Fastlane
97
104
  ENV.delete('FL_NOTARIZE_PASSWORD')
98
105
  end
99
106
 
107
+ def self.staple(package_path)
108
+ Actions.sh(
109
+ "xcrun stapler staple \"#{package_path}\"",
110
+ log: false
111
+ )
112
+ end
113
+
100
114
  def self.description
101
115
  'Notarizes a macOS app'
102
116
  end
@@ -119,6 +133,12 @@ module Fastlane
119
133
  verify_block: proc do |value|
120
134
  UI.user_error!("Could not find package at '#{value}'") unless File.exist?(value)
121
135
  end),
136
+ FastlaneCore::ConfigItem.new(key: :try_early_stapling,
137
+ env_name: 'FL_NOTARIZE_TRY_EARLY_STAPLING',
138
+ description: 'Whether to try early stapling while the notarization request is in progress',
139
+ optional: true,
140
+ default_value: false,
141
+ type: Boolean),
122
142
  FastlaneCore::ConfigItem.new(key: :bundle_id,
123
143
  env_name: 'FL_NOTARIZE_BUNDLE_ID',
124
144
  description: 'Bundle identifier to uniquely identify the package',
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Notarize
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-notarize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeplin, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-19 00:00:00.000000000 Z
11
+ date: 2019-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry