fastlane-plugin-eac_upload 0.2.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8632e05557228f6f56419640aca6a00713297601640a7ccb2410f6566bf76a2a
4
- data.tar.gz: 84dbfa275c82122b2b969bd784c0fb4443fb2605a753438d13fb0e92a11befb5
3
+ metadata.gz: aee13aff52fb1663109c452844a06ac4544ba69f9d12f5ac0423c81f34c14815
4
+ data.tar.gz: 8d479a1b8769a250190841ee0b28294c4e15e26600d3d940e857103ac4b2ddbe
5
5
  SHA512:
6
- metadata.gz: 610870b1571230373f84291274534dd8631408eb4c34dd7848ca72b06679fe32df5928bfdc480c9e41ab7125af35cd523e38c411134c75b969be205cf2ae0c89
7
- data.tar.gz: 2136f4b8a1edf552271a787748c2db4b044357f4cdb2ba5592daca0c0053eb81cf69129c5a022d20b1f010961efa1172e4aa2c15c0aedd470ee7824c268cb3e6
6
+ metadata.gz: 59536b4b25208030140e05d11b9abe895d762c8b6044fe51d976644d759bc79b5d0c3b8fe399568f19e010e1fe9a0c159b0742ee737a95c1eb5d2483a1a1e118
7
+ data.tar.gz: 0c2af6c7722432e91206c159b4c5c23a7fc2d5674b75fc65749befd390dee8e516a2792463ad8ff142284dde5b4563dfc9b4972725a05c421b073d043565d852
data/README.md CHANGED
@@ -14,13 +14,62 @@ fastlane add_plugin eac_upload
14
14
 
15
15
  Upload IPA/APK/AAB to Enterprise App Cloud
16
16
 
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
17
+ This requires a valid API Token from https://www.enterprise-app-cloud.com
18
18
 
19
19
  ## Example
20
20
 
21
- Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
21
+ In its most basic form, you can just call the action with an api token and it will automatically use the output of any preceding `gym` or `gradle` action
22
22
 
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
23
+ ```
24
+ eac(
25
+ token: "API_KEY"
26
+ )
27
+ ```
28
+
29
+ Alternatively you can provide the token with the environment variable `FL_EAC_TOKEN` and omit it from the call
30
+
31
+ ```
32
+ eac()
33
+ ```
34
+
35
+ In any case where you produce multiple build files in multiple steps that you all want to upload, the artifacts from the first step will remain available in the lane context, so they have to explicitly be ignored in any following steps
36
+ ```
37
+ # Build APK
38
+ gradle(
39
+ gradle_path: gradle_path,
40
+ task: "clean assembleLiveDebug"
41
+ )
42
+ eac()
43
+
44
+ # Build AAB
45
+ gradle(
46
+ gradle_path: gradle_path,
47
+ task: "bundleLiveDebug",
48
+ )
49
+ eac(ignore_apk: true)
50
+ ```
51
+
52
+ The installation url of the uploaded app will be available in the lane context under `FL_EAC_INSTALL_URL`
53
+ ```
54
+ eac()
55
+ slack(pretext: "*Neue Version (iOS) - #{version} (#{build})*",
56
+ message: Actions.lane_context[SharedValues::FL_EAC_INSTALL_URL])
57
+ ```
58
+
59
+ Should an app be available in multiple teams, you can pass the target team in an additional parameter
60
+ ```
61
+ eac(
62
+ token: "API_KEY",
63
+ team_slug: "second_team"
64
+ )
65
+ ```
66
+
67
+ You can add a change with the `changelog` parameter
68
+ ```
69
+ eac(
70
+ changelog: "Some changelog text"
71
+ )
72
+ ```
24
73
 
25
74
  ## Run tests for this plugin
26
75
 
@@ -10,19 +10,20 @@ module Fastlane
10
10
  class EacAction < Action
11
11
  def self.connection(options)
12
12
  require "faraday"
13
- require "faraday_middleware"
13
+ require "faraday/follow_redirects"
14
+ require "faraday/multipart"
14
15
  host = options[:host]
15
16
  uri = URI.parse("#{host}/api/app/upload")
16
17
 
17
18
  foptions = {
18
- url: uri
19
+ url: uri,
19
20
  }
20
21
 
21
22
  Faraday.new(foptions) do |builder|
23
+ builder.response :follow_redirects # use Faraday::FollowRedirects::Middleware
22
24
  builder.request(:multipart)
23
25
  builder.request(:url_encoded)
24
26
  builder.response(:json, content_type: /\bjson$/)
25
- builder.use(FaradayMiddleware::FollowRedirects)
26
27
  builder.adapter(:net_http)
27
28
  end
28
29
  end
@@ -32,14 +33,20 @@ module Fastlane
32
33
  require "uri"
33
34
  require "json"
34
35
 
36
+ # Get build files but respect ignore flags
37
+ ipa = options[:ignore_ipa] ? nil : options[:ipa]
38
+ apk = options[:ignore_apk] ? nil : options[:apk]
39
+ aab = options[:ignore_aab] ? nil : options[:aab]
40
+
35
41
  build_file = [
36
- options[:ipa],
37
- options[:apk]
42
+ ipa,
43
+ apk,
44
+ aab,
38
45
  ].detect { |e| !e.to_s.empty? }
39
-
40
46
  if build_file.nil?
41
- UI.user_error!("You have to provide a build file (params 'apk' or 'ipa')")
47
+ UI.user_error!("You have to provide a build file (params 'apk' or 'ipa' or 'aab')")
42
48
  end
49
+ UI.message("Using build file: #{build_file}")
43
50
 
44
51
  response = self.upload(options, build_file)
45
52
 
@@ -89,6 +96,24 @@ module Fastlane
89
96
 
90
97
  def self.available_options
91
98
  [
99
+ FastlaneCore::ConfigItem.new(key: :ignore_apk,
100
+ env_name: "FL_EAC_IGNORE_APK",
101
+ description: "If true, ignores APK file even if it's available in lane context",
102
+ default_value: false,
103
+ is_string: false,
104
+ optional: true),
105
+ FastlaneCore::ConfigItem.new(key: :ignore_ipa,
106
+ env_name: "FL_EAC_IGNORE_IPA",
107
+ description: "If true, ignores IPA file even if it's available in lane context",
108
+ default_value: false,
109
+ is_string: false,
110
+ optional: true),
111
+ FastlaneCore::ConfigItem.new(key: :ignore_aab,
112
+ env_name: "FL_EAC_IGNORE_AAB",
113
+ description: "If true, ignores AAB file even if it's available in lane context",
114
+ default_value: false,
115
+ is_string: false,
116
+ optional: true),
92
117
  FastlaneCore::ConfigItem.new(key: :host,
93
118
  env_name: "FL_EAC_HOST",
94
119
  description: "The host of the mobivention Enterprise App Cloud API",
@@ -109,28 +134,39 @@ module Fastlane
109
134
  env_name: "FL_EAC_IPA",
110
135
  description: "Path to your IPA file. Optional if you use the _gym_ or _xcodebuild_ action",
111
136
  default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
112
- default_value_dynamic: true,
113
137
  optional: true,
114
138
  verify_block: proc do |value|
115
139
  UI.user_error!("Couldn't find ipa file at path '#{value}'") unless File.exist?(value)
116
140
  end,
117
- conflicting_options: [:apk],
141
+ conflicting_options: [:apk, :aab],
118
142
  conflict_block: proc do |value|
119
143
  UI.user_error!("You can't use 'ipa' and '#{value.key}' options in one run")
120
144
  end),
121
145
  FastlaneCore::ConfigItem.new(key: :apk,
122
146
  env_name: "FL_EAC_APK",
123
- description: "Path to your APK file",
147
+ description: "Path to your APK file. Optional if you use the _gradle_ action",
124
148
  default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH],
125
- default_value_dynamic: true,
126
149
  optional: true,
127
150
  verify_block: proc do |value|
128
151
  UI.user_error!("Couldn't find apk file at path '#{value}'") unless File.exist?(value)
129
152
  end,
130
- conflicting_options: [:ipa],
153
+ conflicting_options: [:ipa, :aab],
131
154
  conflict_block: proc do |value|
132
155
  UI.user_error!("You can't use 'apk' and '#{value.key}' options in one run")
133
- end)
156
+ end),
157
+ FastlaneCore::ConfigItem.new(key: :aab,
158
+ env_name: "FL_EAC_AAB",
159
+ description: "Path to your AAB file. Optional if you use the _gradle_ action",
160
+ default_value: Actions.lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH],
161
+ optional: true,
162
+ verify_block: proc do |value|
163
+ UI.user_error!("Couldn't find aab file at path '#{value}'") unless File.exist?(value)
164
+ end,
165
+ conflicting_options: [:ipa, :apk],
166
+ conflict_block: proc do |value|
167
+ UI.user_error!("You can't use 'aab' and '#{value.key}' options in one run")
168
+ end),
169
+
134
170
  ]
135
171
  end
136
172
 
@@ -151,7 +187,13 @@ module Fastlane
151
187
  'eac(
152
188
  host: "https://enterprise-app-cloud.com",
153
189
  token: "abcdefgh",
154
- )'
190
+ )',
191
+ 'eac(
192
+ host: "https://enterprise-app-cloud.com",
193
+ token: "abcdefgh",
194
+ ignore_apk: true,
195
+ ipa: "./path/to/my/app.ipa"
196
+ )',
155
197
  ]
156
198
  end
157
199
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module EacUpload
3
- VERSION = "0.2.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -1,10 +1,10 @@
1
- require 'fastlane/plugin/eac_upload/version'
1
+ require "fastlane/plugin/eac_upload/version"
2
2
 
3
3
  module Fastlane
4
4
  module EacUpload
5
5
  # Return all .rb files inside the "actions" and "helper" directory
6
6
  def self.all_classes
7
- Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
7
+ Dir[File.expand_path("**/{actions,helper}/*.rb", File.dirname(__FILE__))]
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-eac_upload
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mobivention GmbH
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-07-15 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  email: technik@mobivention.com
13
13
  executables: []
@@ -38,7 +38,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  requirements: []
41
- rubygems_version: 3.6.5
41
+ rubygems_version: 4.0.3
42
42
  specification_version: 4
43
43
  summary: Upload IPA/APK/AAB to Enterprise App Cloud
44
44
  test_files: []