fastlane-plugin-verify_ipa_with_app_store_connect 0.1.0 → 1.0.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
  SHA256:
3
- metadata.gz: dfab198795b0518959e8e54de8822d3ddbf5bb0da5e8eb612aada16e2f9c0995
4
- data.tar.gz: ef3b1b81020360fd6d770d32e8e92f662a0f8ece631448f84ed6dbe4b8968d27
3
+ metadata.gz: 0677a740aa7e0b8d0ac48463cf7052253af3cef440ee5e2758df2d6f4814eb3d
4
+ data.tar.gz: f6e825799386e0b44a15ab9f8d38cdd30745c62129e876945977cf975e0e2088
5
5
  SHA512:
6
- metadata.gz: 59faf9c81212b6ca293aa35d8fcea70b532689259c757f187edd23dee2b665157a268bdfe51747cafd60ef0335f5420d7090acbf41d4f9e6eb0e0bb2ecb72032
7
- data.tar.gz: a00f9eaefe17c4d3e1f370380e4bd9a882ed856b92b729e72e29bdd7ba411664b12b09ff002f3749292ca4564c9247113a0b56d65d6ef5ea492b30e2a8476311
6
+ metadata.gz: 0616f4a88ccad1d278a2f1f8e53eddb15aa1dcd6d9eb6a5815ad3e9617c31cbca96d87fa0a55e9f38aff819adcbd716cec3d6c6cda4a1cb81cab3b0a203a86cf
7
+ data.tar.gz: 7e2fa4e2547a62181915c99261a93ee202a1a205d4fda6538187648efdfb8dc5c79c807fa8bcee6fe485535ffa3aa0bdfa950dca0c82eab54b2ff2a7a7c8da72
@@ -5,59 +5,52 @@ module Fastlane
5
5
  module Actions
6
6
  class VerifyIpaWithAppStoreConnectAction < Action
7
7
  def self.run(params)
8
- UI.message "Parameter ipa_path: #{params[:ipa_path]}"
8
+ ipa_path = params[:ipa_path]
9
9
 
10
- app = find_app(params)
11
-
12
- package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate(
13
- app_id: app.id,
14
- ipa_path: params[:ipa_path],
15
- package_path: "/tmp",
16
- platform: params[:platform]
17
- )
10
+ UI.message "Parameter ipa_path: #{ipa_path}"
18
11
 
19
12
  api_token = params[:api_token]
20
- transporter = FastlaneCore::JavaTransporterExecutor.new
21
13
 
22
- command = [
23
- 'xcrun iTMSTransporter',
24
- '-m verify',
25
- "-jwt #{api_token.text}",
26
- "-f #{package_path.shellescape}",
27
- '2>&1' # cause stderr to be written to stdout
28
- ].compact.join(' ') # compact gets rid of the possibly nil ENV value
14
+ transporter = FastlaneCore::AltoolTransporterExecutor.new
15
+
16
+ api_key = { key_id: api_token.key_id, issuer_id: api_token.issuer_id, key: api_token.key_raw }
17
+
18
+ api_key = api_key.clone
19
+ api_key[:key_dir] = Dir.mktmpdir("deliver-")
20
+ # Specified p8 needs to be generated to call altool
21
+ File.open(File.join(api_key[:key_dir], "AuthKey_#{api_key[:key_id]}.p8"), "wb") do |p8|
22
+ p8.write(api_key[:key])
23
+ end
29
24
 
25
+ command = [
26
+ "API_PRIVATE_KEYS_DIR=#{api_key[:key_dir]}",
27
+ "xcrun altool",
28
+ "--validate-app",
29
+ "--apiKey #{api_key[:key_id]}",
30
+ "--apiIssuer #{api_key[:issuer_id]}",
31
+ "-t #{params[:platform]}",
32
+ "-f #{ipa_path.shellescape}",
33
+ "-k 100000"
34
+ ].compact.join(' ')
30
35
 
31
36
  UI.verbose(command)
32
37
 
33
- result = transporter.execute(command, false)
38
+ begin
39
+ result = transporter.execute(command, false)
40
+ ensure
41
+ FileUtils.rm_rf(api_key[:key_dir]) # we don't need the file with the api key any more
42
+ # FileUtils.rm_rf(package_path) # we don't need the ipa any more
43
+ end
34
44
 
35
45
  if result
36
46
  UI.header("Successfully verified package with App Store Connect.")
37
47
  end
38
48
 
39
- FileUtils.rm_rf(package_path) unless Helper.test? # we don't need the package any more
40
-
41
49
  unless result
42
50
  UI.user_error!("Error verifying ipa file!")
43
51
  end
44
52
  end
45
53
 
46
- def self.find_app(options)
47
- app_identifier = options[:app_identifier]
48
-
49
- if !app_identifier.to_s.empty?
50
- Spaceship::ConnectAPI.token = options[:api_token]
51
- app = Spaceship::ConnectAPI::App.find(app_identifier)
52
- end
53
-
54
- if app
55
- return app
56
- else
57
- UI.user_error!("Could not find app with app identifier '#{options[:app_identifier]}' in your App Store Connect account")
58
- end
59
- end
60
-
61
54
  #####################################################
62
55
  # @!group Documentation
63
56
  #####################################################
@@ -72,11 +65,6 @@ module Fastlane
72
65
 
73
66
  def self.available_options
74
67
  [
75
- FastlaneCore::ConfigItem.new(key: :app_identifier,
76
- env_name: "FL_VERIFY_IPA_APP_IDENTIFIER",
77
- description: "Provide the app identifier",
78
- is_string: true, # true: verifies the input is a string, false: every kind of value
79
- default_value: false), # the default value if the user didn't provide one
80
68
  FastlaneCore::ConfigItem.new(key: :ipa_path,
81
69
  env_name: "FL_VERIFY_IPA_IPA_PATH",
82
70
  description: "Path to the ipa file to validate",
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module VerifyIpaWithAppStoreConnect
3
- VERSION = "0.1.0"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-verify_ipa_with_app_store_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Onno Bergob
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-30 00:00:00.000000000 Z
11
+ date: 2022-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -128,15 +128,15 @@ dependencies:
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: 2.174.0
131
+ version: 2.210.1
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: 2.174.0
139
- description:
138
+ version: 2.210.1
139
+ description:
140
140
  email: oonoo@github.com
141
141
  executables: []
142
142
  extensions: []
@@ -152,7 +152,7 @@ homepage: https://github.com/oonoo/verify_ipa_with_app_store_connect
152
152
  licenses:
153
153
  - MIT
154
154
  metadata: {}
155
- post_install_message:
155
+ post_install_message:
156
156
  rdoc_options: []
157
157
  require_paths:
158
158
  - lib
@@ -167,8 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubygems_version: 3.0.3
171
- signing_key:
170
+ rubygems_version: 3.3.7
171
+ signing_key:
172
172
  specification_version: 4
173
- summary: Uses iTMSTransporter to verify an ipa with App Store Connect.
173
+ summary: Uses altool to verify an ipa with App Store Connect.
174
174
  test_files: []