fastlane 1.2.1 → 1.2.2

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: 23eb08cf31c0bf46dcaf83cd3990c4a309b058e0
4
- data.tar.gz: 856db68aae7110c110feffc8280eab727de585eb
3
+ metadata.gz: 7504d19e0947b1f15febb96de94cc07b8bf0fde9
4
+ data.tar.gz: 20cbc95a8a9952d079058c2ee1ade20c3d929bf0
5
5
  SHA512:
6
- metadata.gz: 41e44af1a80c94fc561d921f30046fb3b947c6ffa67138e9cdef1c55f2617836c194f0de493568cb5c9550d06ba722729c8833cc8bd19a1941468e4724c240c1
7
- data.tar.gz: e7e08d90fe11ea8e1cc8761f6612741762014e4e06ce65b5634efadd0917af16062d2b5abe4a5cad355924ba206b02e43dab65e0f31e84daf3bd6932264ac9c1
6
+ metadata.gz: cb83ee5d50fffc5e373500655115b9a0ac366932cdb09f6b9424285262606f86af886d08b41945b29263e6919b5d5087b8e40f563f8bee1468f3d33a3c667c33
7
+ data.tar.gz: 5c4376f9782cd7f87fb4c273b57b526c413a023438966c84d53cb111afb41064fa823945a96ba763ad70801484197ce89b8f103eda80dd6b73a6a139b8f0cc3f
data/README.md CHANGED
@@ -30,6 +30,7 @@ Get in contact with the developer on Twitter: [@KrauseFx](https://twitter.com/Kr
30
30
  <a href="#features">Features</a> &bull;
31
31
  <a href="#installation">Installation</a> &bull;
32
32
  <a href="#quick-start">Quick Start</a> &bull;
33
+ <a href="#examples">Example Setups</a> &bull;
33
34
  <a href="#need-help">Need help?</a>
34
35
  </p>
35
36
 
@@ -41,11 +42,13 @@ Why should you have to remember complicated commands and parameters?
41
42
 
42
43
  Store your configuration in a text file to easily test, builld, and deploy from _any_ computer.
43
44
 
44
- Just edit the ```Fastfile``` to define multiple ```lanes```, or different workflows.
45
+ [Take a look at how Wikipedia and Product Hunt use `fastlane`](https://github.com/fastlane/examples).
45
46
 
46
- Examples are: ```appstore```, ```beta``` and ```test```.
47
+ Just edit the `Fastfile` to define multiple `lanes`, or different workflows.
47
48
 
48
- You define a ```lane``` like this (more details about the commands in the [Actions](https://github.com/KrauseFx/fastlane/blob/master/docs/Actions.md) documentation):
49
+ Examples are: `appstore`, `beta` and `test`.
50
+
51
+ You define a `lane` like this (more details about the commands in the [Actions](https://github.com/KrauseFx/fastlane/blob/master/docs/Actions.md) documentation):
49
52
 
50
53
  ```ruby
51
54
  lane :appstore do
@@ -128,6 +131,10 @@ Usually you'll use fastlane by triggering individual lanes:
128
131
  - `fastlane action [action_name]`: Shows a more detailed description of an action
129
132
  - `fastlane new_action`: Create a new action (integration) for fastlane
130
133
 
134
+ ## Examples
135
+
136
+ See how [Wikipedia](https://github.com/fastlane/examples#wikipedia-by-wikimedia-foundation), [Product Hunt](https://github.com/fastlane/examples#product-hunt) and [MindNode](https://github.com/fastlane/examples#mindnode) use `fastlane` to automate their iOS submission process.
137
+
131
138
  ## [`fastlane`](https://fastlane.tools) Toolchain
132
139
 
133
140
  `fastlane` is designed to make your life easier by bringing together the `fastlane` suite of tools under one roof.
@@ -56,7 +56,7 @@ platform :ios do
56
56
  lane :deploy do
57
57
  snapshot
58
58
  sigh
59
- deliver(skip_deploy: true, :force: true)
59
+ deliver(skip_deploy: true, force: true)
60
60
  # frameit
61
61
  end
62
62
 
@@ -0,0 +1,4 @@
1
+ {
2
+ "latestVersion": "<%= full_version %>",
3
+ "updateUrl": "itms-services://?action=download-manifest&url=<%= url %>"
4
+ }
@@ -10,6 +10,7 @@ module Fastlane
10
10
  S3_DSYM_OUTPUT_PATH = :S3_DSYM_OUTPUT_PATH
11
11
  S3_PLIST_OUTPUT_PATH = :S3_PLIST_OUTPUT_PATH
12
12
  S3_HTML_OUTPUT_PATH = :S3_HTML_OUTPUT_PATH
13
+ S3_VERSION_OUTPUT_PATH = :S3_VERSION_OUTPUT_PATH
13
14
  end
14
15
 
15
16
  S3_ARGS_MAP = {
@@ -41,6 +42,8 @@ module Fastlane
41
42
  params[:plist_template_path] = config[:plist_template_path]
42
43
  params[:html_template_path] = config[:html_template_path]
43
44
  params[:html_file_name] = config[:html_file_name]
45
+ params[:version_template_path] = config[:version_template_path]
46
+ params[:version_file_name] = config[:version_file_name]
44
47
 
45
48
  # Maps nice developer build parameters to Shenzhen args
46
49
  build_args = params_to_build_args(params)
@@ -62,6 +65,8 @@ module Fastlane
62
65
  plist_template_path = params[:plist_template_path]
63
66
  html_template_path = params[:html_template_path]
64
67
  html_file_name = params[:html_file_name]
68
+ version_template_path = params[:version_template_path]
69
+ version_file_name = params[:version_file_name]
65
70
 
66
71
  if Helper.is_test?
67
72
  return build_args
@@ -81,7 +86,7 @@ module Fastlane
81
86
  #####################################
82
87
 
83
88
  # Gets info used for the plist
84
- bundle_id, bundle_version, title = get_ipa_info( ipa_file )
89
+ bundle_id, bundle_version, title, full_version = get_ipa_info( ipa_file )
85
90
 
86
91
  # Gets URL for IPA file
87
92
  url_part = expand_path_with_substitutions_from_ipa_plist( ipa_file, s3_path )
@@ -105,6 +110,9 @@ module Fastlane
105
110
  html_file_name ||= "index.html"
106
111
  html_url = "https://#{s3_subdomain}.amazonaws.com/#{s3_bucket}/#{html_file_name}"
107
112
 
113
+ version_file_name ||= "version.json"
114
+ version_url = "https://#{s3_subdomain}.amazonaws.com/#{s3_bucket}/#{version_file_name}"
115
+
108
116
  # Creates plist from template
109
117
  plist_template_path ||= "#{Helper.gem_path('fastlane')}/lib/assets/s3_plist_template.erb"
110
118
  plist_template = File.read(plist_template_path)
@@ -129,6 +137,16 @@ module Fastlane
129
137
  })
130
138
  html_render = et.render(html_template)
131
139
 
140
+ # Creates version from template
141
+ version_template_path ||= "#{Helper.gem_path('fastlane')}/lib/assets/s3_version_template.erb"
142
+ version_template = File.read(version_template_path)
143
+
144
+ et = ErbalT.new({
145
+ url: plist_url,
146
+ full_version: full_version,
147
+ })
148
+ version_render = et.render(version_template)
149
+
132
150
  #####################################
133
151
  #
134
152
  # html and plist uploading
@@ -142,7 +160,9 @@ module Fastlane
142
160
  plist_file_name,
143
161
  plist_render,
144
162
  html_file_name,
145
- html_render
163
+ html_render,
164
+ version_file_name,
165
+ version_render
146
166
  )
147
167
 
148
168
  return true
@@ -163,7 +183,7 @@ module Fastlane
163
183
  end.compact
164
184
  end
165
185
 
166
- def self.upload_plist_and_html_to_s3(s3_access_key, s3_secret_access_key, s3_bucket, plist_file_name, plist_render, html_file_name, html_render)
186
+ def self.upload_plist_and_html_to_s3(s3_access_key, s3_secret_access_key, s3_bucket, plist_file_name, plist_render, html_file_name, html_render, version_file_name, version_render)
167
187
  require 'aws-sdk'
168
188
  s3_client = AWS::S3.new(
169
189
  access_key_id: s3_access_key,
@@ -173,6 +193,7 @@ module Fastlane
173
193
 
174
194
  plist_obj = bucket.objects.create(plist_file_name, plist_render.to_s, :acl => :public_read)
175
195
  html_obj = bucket.objects.create(html_file_name, html_render.to_s, :acl => :public_read)
196
+ version_obj = bucket.objects.create(version_file_name, version_render.to_s, :acl => :public_read)
176
197
 
177
198
  # Setting actionand environment variables
178
199
  Actions.lane_context[SharedValues::S3_PLIST_OUTPUT_PATH] = plist_obj.public_url.to_s
@@ -181,6 +202,9 @@ module Fastlane
181
202
  Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH] = html_obj.public_url.to_s
182
203
  ENV[SharedValues::S3_HTML_OUTPUT_PATH.to_s] = html_obj.public_url.to_s
183
204
 
205
+ Actions.lane_context[SharedValues::S3_VERSION_OUTPUT_PATH] = version_obj.public_url.to_s
206
+ ENV[SharedValues::S3_VERSION_OUTPUT_PATH.to_s] = version_obj.public_url.to_s
207
+
184
208
  Helper.log.info "Successfully uploaded ipa file to '#{html_obj.public_url.to_s}'".green
185
209
  end
186
210
 
@@ -214,7 +238,7 @@ module Fastlane
214
238
  end
215
239
 
216
240
  def self.get_ipa_info(ipa_file)
217
- bundle_id, bundle_version, title = nil
241
+ bundle_id, bundle_version, title, full_version = nil
218
242
  Dir.mktmpdir do |dir|
219
243
 
220
244
  system "unzip -q #{ipa_file} -d #{dir} 2> /dev/null"
@@ -224,8 +248,11 @@ module Fastlane
224
248
  bundle_version = Shenzhen::PlistBuddy.print(plist, 'CFBundleShortVersionString')
225
249
  title = Shenzhen::PlistBuddy.print(plist, 'CFBundleName')
226
250
 
251
+ # This is the string: {CFBundleShortVersionString}.{CFBundleVersion}
252
+ full_version = bundle_version + '.' + Shenzhen::PlistBuddy.print(plist, 'CFBundleVersion')
253
+
227
254
  end
228
- return bundle_id, bundle_version, title
255
+ return bundle_id, bundle_version, title, full_version
229
256
  end
230
257
 
231
258
  def self.description
@@ -256,6 +283,14 @@ module Fastlane
256
283
  env_name: "",
257
284
  description: "uploaded html filename",
258
285
  optional: true),
286
+ FastlaneCore::ConfigItem.new(key: :version_template_path,
287
+ env_name: "",
288
+ description: "version erb template path",
289
+ optional: true),
290
+ FastlaneCore::ConfigItem.new(key: :version_file_name,
291
+ env_name: "",
292
+ description: "uploaded version filename",
293
+ optional: true),
259
294
  FastlaneCore::ConfigItem.new(key: :access_key,
260
295
  env_name: "S3_ACCESS_KEY",
261
296
  description: "AWS Access Key ID ",
@@ -297,7 +332,8 @@ module Fastlane
297
332
  ['S3_IPA_OUTPUT_PATH', 'Direct HTTP link to the uploaded ipa file'],
298
333
  ['S3_DSYM_OUTPUT_PATH', 'Direct HTTP link to the uploaded dsym file'],
299
334
  ['S3_PLIST_OUTPUT_PATH', 'Direct HTTP link to the uploaded plist file'],
300
- ['S3_HTML_OUTPUT_PATH', 'Direct HTTP link to the uploaded HTML file']
335
+ ['S3_HTML_OUTPUT_PATH', 'Direct HTTP link to the uploaded HTML file'],
336
+ ['S3_VERSION_OUTPUT_PATH', 'Direct HTTP link to the uploaded Version file']
301
337
  ]
302
338
  end
303
339
 
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '1.2.1'
2
+ VERSION = '1.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -376,6 +376,7 @@ files:
376
376
  - lib/assets/custom_action_template.rb
377
377
  - lib/assets/s3_html_template.erb
378
378
  - lib/assets/s3_plist_template.erb
379
+ - lib/assets/s3_version_template.erb
379
380
  - lib/fastlane.rb
380
381
  - lib/fastlane/action.rb
381
382
  - lib/fastlane/action_collector.rb