fastlane 1.84.0 → 1.85.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
  SHA1:
3
- metadata.gz: 1bb9bbb192fbf3dbd714c7f8f9eb75f60d2796e0
4
- data.tar.gz: 2d99a2bff9ba0ef2292b9e0e9f2542b8c12f36f0
3
+ metadata.gz: 5f00e39921c28effcc81677360d5922347caee20
4
+ data.tar.gz: 49c4f159f75869eda5692feff918c76827fa7b8e
5
5
  SHA512:
6
- metadata.gz: 7d54ef40ffe53354560372fab441d084edebf43e817d817b7c286d821ac6eca5f29d7a4246e6d2483d2c5ed7f20befc19b405754b4889438b85f31f233ce821a
7
- data.tar.gz: 765d86e6d751848d7bb27a3147202de3ae0987112227372bce3ece0bab577f9c61d3daa99aa47abe6f9f38a9662ac656a24b564e3b8864218357b7319638f173
6
+ metadata.gz: bce5e5db952069eee25cd64dab6da6ca2ae1ed2dd028795bffade38b895c7739f9972f107f52eb041ab7ff384e4b0d8267d90385858076488d5f11bf51601a1d
7
+ data.tar.gz: e42639ca6e7697722a4120d5ca8b6ed53822292f0e7921c82907c32d80ee10945c80a65d7d18ab460de9bfb6983f784ef3b87688edf4f10e82344f3fdb222ba1
data/lib/fastlane.rb CHANGED
@@ -14,6 +14,7 @@ require 'fastlane/action'
14
14
  require 'fastlane/action_collector'
15
15
  require 'fastlane/supported_platforms'
16
16
  require 'fastlane/configuration_helper'
17
+ require 'fastlane/one_off'
17
18
  require 'fastlane/command_line_handler'
18
19
  require 'fastlane/documentation/docs_generator'
19
20
 
@@ -9,7 +9,7 @@ module Fastlane
9
9
  message = options[:message] || "#{tag} (fastlane)"
10
10
 
11
11
  UI.message "Adding git tag '#{tag}' 🎯."
12
- Actions.sh("git tag -am '#{message}' '#{tag}'")
12
+ Actions.sh("git tag -am #{message.shellescape} '#{tag}'")
13
13
  end
14
14
 
15
15
  def self.description
@@ -1,7 +1,6 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  module SharedValues
4
- APPETIZE_PRIVATE_KEY = :APPETIZE_PRIVATE_KEY
5
4
  APPETIZE_PUBLIC_KEY = :APPETIZE_PUBLIC_KEY
6
5
  APPETIZE_APP_URL = :APPETIZE_APP_URL
7
6
  APPETIZE_MANAGE_URL = :APPETIZE_MANAGE_URL
@@ -19,7 +18,7 @@ module Fastlane
19
18
  require 'json'
20
19
 
21
20
  params = {
22
- platform: 'ios'
21
+ platform: 'ios'
23
22
  }
24
23
 
25
24
  if options[:path]
@@ -38,12 +37,14 @@ module Fastlane
38
37
  http = Net::HTTP.new(uri.host, uri.port)
39
38
  http.use_ssl = true
40
39
 
40
+ UI.message "Uploading ipa to appetize... this might take a while"
41
41
  response = http.request(req)
42
42
 
43
- UI.user_error!("Error uploading app to Appetize.io") unless parse_response(response)
43
+ parse_response(response) # this will raise an exception if something goes wrong
44
+
44
45
  UI.message("App URL: #{Actions.lane_context[SharedValues::APPETIZE_APP_URL]}")
45
46
  UI.message("Manage URL: #{Actions.lane_context[SharedValues::APPETIZE_MANAGE_URL]}")
46
- UI.message("App Private Key: #{Actions.lane_context[SharedValues::APPETIZE_PRIVATE_KEY]}")
47
+ UI.message("Public Key: #{Actions.lane_context[SharedValues::APPETIZE_PUBLIC_KEY]}")
47
48
  UI.success("Build successfully uploaded to Appetize.io")
48
49
  end
49
50
 
@@ -68,17 +69,15 @@ module Fastlane
68
69
  body = JSON.parse(response.body)
69
70
  app_url = body['appURL']
70
71
  manage_url = body['manageURL']
71
- private_key = body['privateKey']
72
72
  public_key = body['publicKey']
73
73
 
74
- Actions.lane_context[SharedValues::APPETIZE_PRIVATE_KEY] = private_key
75
74
  Actions.lane_context[SharedValues::APPETIZE_PUBLIC_KEY] = public_key
76
75
  Actions.lane_context[SharedValues::APPETIZE_APP_URL] = app_url
77
76
  Actions.lane_context[SharedValues::APPETIZE_MANAGE_URL] = manage_url
78
77
  return true
79
- rescue
80
- UI.error("Error uploading to Appetize.io: #{response.body}")
81
- return false
78
+ rescue => ex
79
+ UI.error ex
80
+ UI.user_error!("Error uploading to Appetize.io: #{response.body}")
82
81
  end
83
82
  private_class_method :parse_response
84
83
 
@@ -97,7 +96,7 @@ module Fastlane
97
96
  end),
98
97
  FastlaneCore::ConfigItem.new(key: :url,
99
98
  env_name: "APPETIZE_URL",
100
- description: "Target url of the zipped build. Either this or `path` must be specified",
99
+ description: "URL from which the ipa file can be fetched. Alternative to :path",
101
100
  is_string: true,
102
101
  optional: true),
103
102
  FastlaneCore::ConfigItem.new(key: :path,
@@ -107,9 +106,14 @@ module Fastlane
107
106
  optional: true),
108
107
  FastlaneCore::ConfigItem.new(key: :public_key,
109
108
  env_name: "APPETIZE_PUBLICKEY",
110
- description: "Public key of the app you wish to update. If not provided, then a new app entry will be created on Appetize.io",
109
+ description: "If not provided, a new app will be created. If provided, the existing build will be overwritten",
111
110
  is_string: true,
112
- optional: true),
111
+ optional: true,
112
+ verify_block: proc do |value|
113
+ if value.start_with?("private_")
114
+ UI.user_error!("You provided a private key to appetize, please provide the public key")
115
+ end
116
+ end),
113
117
  FastlaneCore::ConfigItem.new(key: :note,
114
118
  env_name: "APPETIZE_NOTE",
115
119
  description: "Notes you wish to add to the uploaded app",
@@ -120,7 +124,6 @@ module Fastlane
120
124
 
121
125
  def self.output
122
126
  [
123
- ['APPETIZE_PRIVATE_KEY', 'a string that is used to prove "ownership" of your app.'],
124
127
  ['APPETIZE_PUBLIC_KEY', 'a public identiifer for your app. Use this to update your app after it has been initially created'],
125
128
  ['APPETIZE_APP_URL', 'a page to test and share your app.'],
126
129
  ['APPETIZE_MANAGE_URL', 'a page to manage your app.']
@@ -0,0 +1,118 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ end
5
+
6
+ class AppetizeViewingUrlGeneratorAction < Action
7
+ def self.run(params)
8
+ link = "https://appetize.io/embed/#{params[:public_key]}"
9
+
10
+ if params[:scale].nil? # sensible default values for scaling
11
+ case params[:device].downcase.to_sym
12
+ when :iphone6splus, :iphone6plus
13
+ params[:scale] = "50"
14
+ when :ipadair, :ipadair2
15
+ params[:scale] = "50"
16
+ else
17
+ params[:scale] = "75"
18
+ end
19
+ end
20
+
21
+ url_params = []
22
+ url_params << "autoplay=true"
23
+ url_params << "orientation=#{params[:orientation]}"
24
+ url_params << "device=#{params[:device]}"
25
+ url_params << "deviceColor=#{params[:color]}"
26
+ url_params << "scale=#{params[:scale]}"
27
+ url_params << "launchUrl=#{params[:launch_url]}" if params[:launch_url]
28
+ url_params << "language=#{params[:language]}" if params[:language]
29
+
30
+ return link + "?" + url_params.join("&")
31
+ end
32
+
33
+ #####################################################
34
+ # @!group Documentation
35
+ #####################################################
36
+
37
+ def self.description
38
+ "Generate an URL for appetize simulator"
39
+ end
40
+
41
+ def self.details
42
+ end
43
+
44
+ def self.available_options
45
+ [
46
+ FastlaneCore::ConfigItem.new(key: :public_key,
47
+ env_name: "APPETIZE_PUBLICKEY",
48
+ description: "Public key of the app you wish to update",
49
+ is_string: true,
50
+ default_value: Actions.lane_context[SharedValues::APPETIZE_PUBLIC_KEY],
51
+ optional: false,
52
+ verify_block: proc do |value|
53
+ if value.start_with?("private_")
54
+ UI.user_error!("You provided a private key to appetize, please provide the public key")
55
+ end
56
+ end),
57
+ FastlaneCore::ConfigItem.new(key: :device,
58
+ env_name: "APPETIZE_VIEWING_URL_GENERATOR_DEVICE",
59
+ description: "Device type: iphone4s, iphone5s, iphone6, iphone6plus, ipadair, iphone6s, iphone6splus, ipadair2, nexus5, nexus7 or nexus9",
60
+ is_string: true,
61
+ default_value: "iphone5s"),
62
+ FastlaneCore::ConfigItem.new(key: :scale,
63
+ env_name: "APPETIZE_VIEWING_URL_GENERATOR_SCALE",
64
+ description: "Scale of the simulator",
65
+ is_string: true,
66
+ optional: true,
67
+ verify_block: proc do |value|
68
+ available = ["25", "50", "75", "100"]
69
+ UI.user_error!("Invalid scale, available: #{available.join(', ')}") unless available.include?(value)
70
+ end),
71
+ FastlaneCore::ConfigItem.new(key: :orientation,
72
+ env_name: "APPETIZE_VIEWING_URL_GENERATOR_ORIENTATION",
73
+ description: "Device orientation",
74
+ is_string: true,
75
+ default_value: "portrait",
76
+ verify_block: proc do |value|
77
+ available = ["portrait", "landscape"]
78
+ UI.user_error!("Invalid device, available: #{available.join(', ')}") unless available.include?(value)
79
+ end),
80
+ FastlaneCore::ConfigItem.new(key: :language,
81
+ env_name: "APPETIZE_VIEWING_URL_GENERATOR_LANGUAGE",
82
+ description: "Device language in ISO 639-1 language code, e.g. 'de'",
83
+ is_string: true,
84
+ optional: true),
85
+ FastlaneCore::ConfigItem.new(key: :color,
86
+ env_name: "APPETIZE_VIEWING_URL_GENERATOR_COLOR",
87
+ description: "Color of the device",
88
+ is_string: true,
89
+ default_value: "black",
90
+ verify_block: proc do |value|
91
+ available = ["black", "white", "silver", "gray"]
92
+ UI.user_error!("Invalid device color, available: #{available.join(', ')}") unless available.include?(value)
93
+ end),
94
+ FastlaneCore::ConfigItem.new(key: :launch_url,
95
+ env_name: "APPETIZE_VIEWING_URL_GENERATOR_LAUNCH_URL",
96
+ description: "Specify a deep link to open when your app is launched",
97
+ is_string: true,
98
+ optional: true)
99
+ ]
100
+ end
101
+
102
+ def self.output
103
+ end
104
+
105
+ def self.return_value
106
+ "The URL to preview the iPhone app"
107
+ end
108
+
109
+ def self.authors
110
+ ["KrauseFx"]
111
+ end
112
+
113
+ def self.is_supported?(platform)
114
+ [:ios].include?(platform)
115
+ end
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,79 @@
1
+ module Fastlane
2
+ module Actions
3
+ class BuildAndUploadToAppetizeAction < Action
4
+ def self.run(params)
5
+ tmp_path = "/tmp/fastlane_build"
6
+
7
+ xcodebuild_configs = params[:xcodebuild]
8
+ xcodebuild_configs[:sdk] = "iphonesimulator"
9
+ xcodebuild_configs[:derivedDataPath] = tmp_path
10
+ xcodebuild_configs[:scheme] ||= params[:scheme] if params[:scheme].to_s.length > 0
11
+
12
+ Actions::XcodebuildAction.run(xcodebuild_configs)
13
+
14
+ app_path = Dir[File.join(tmp_path, "**", "*.app")].last
15
+ UI.user_error!("Couldn't find app") unless app_path
16
+
17
+ zipped_ipa = Actions::ZipAction.run(path: app_path,
18
+ output_path: File.join(tmp_path, "Result.zip"))
19
+
20
+ Actions::AppetizeAction.run(path: zipped_ipa,
21
+ api_token: params[:api_token])
22
+
23
+ public_key = Actions.lane_context[SharedValues::APPETIZE_PUBLIC_KEY]
24
+ UI.success("Generated Public Key: #{Actions.lane_context[SharedValues::APPETIZE_PUBLIC_KEY]}")
25
+
26
+ FileUtils.rm_rf(tmp_path)
27
+
28
+ return public_key
29
+ end
30
+
31
+ #####################################################
32
+ # @!group Documentation
33
+ #####################################################
34
+
35
+ def self.description
36
+ "Generate and upload an ipa file to appetize.io"
37
+ end
38
+
39
+ def self.details
40
+ "This should be called from danger"
41
+ end
42
+
43
+ def self.available_options
44
+ [
45
+ FastlaneCore::ConfigItem.new(key: :xcodebuild,
46
+ description: "Parameters that are passed to the xcodebuild action",
47
+ type: Hash,
48
+ default_value: {},
49
+ short_option: '-x',
50
+ optional: true),
51
+ FastlaneCore::ConfigItem.new(key: :scheme,
52
+ description: "The scheme to build. Can also be passed using the `xcodebuild` parameter",
53
+ type: String,
54
+ short_option: '-s',
55
+ optional: true),
56
+ FastlaneCore::ConfigItem.new(key: :api_token,
57
+ env_name: "APPETIZE_API_TOKEN",
58
+ description: "Appetize.io API Token",
59
+ is_string: true)
60
+ ]
61
+ end
62
+
63
+ def self.output
64
+ end
65
+
66
+ def self.return_value
67
+ ""
68
+ end
69
+
70
+ def self.authors
71
+ ["KrauseFx"]
72
+ end
73
+
74
+ def self.is_supported?(platform)
75
+ platform == :ios
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,156 @@
1
+ # fastlane danger Device Grid
2
+
3
+ Ever dream of testing your app straight from a pull request? Well now you can! With [fastlane](https://fastlane.tools), [danger](https://github.com/danger/danger) and [appetize.io](https://appetize.io/), you can stream your latest changes right from the browser.
4
+
5
+ No more manually installing and testing your app just to review a PR.
6
+
7
+ ![assets/GridExampleScreenshot.png](assets/GridExampleScreenshot.png)
8
+
9
+ ## Requirements
10
+
11
+ - [fastlane](https://fastlane.tools)
12
+ - [danger](https://github.com/danger/danger)
13
+ - [appetize.io](https://appetize.io/) account
14
+ - A Continuous Integration system
15
+
16
+ ## Getting started
17
+
18
+ ### Install fastlane and danger
19
+
20
+ Create a `Gemfile` in your project's directory with the following content
21
+
22
+ ```ruby
23
+ gem "fastlane"
24
+ gem "danger"
25
+ ```
26
+
27
+ and run
28
+
29
+ ```
30
+ bundle install
31
+ ```
32
+
33
+ ### Setup `fastlane`
34
+
35
+ Skip this step if you're already using `fastlane` (which you should)
36
+
37
+ ```
38
+ fastlane init
39
+ ```
40
+
41
+ ### Setup `danger`
42
+
43
+ ```
44
+ danger init
45
+ ```
46
+
47
+ Follow the `danger` guide to authenticate with GitHub
48
+
49
+ ### Configure `danger`
50
+
51
+ Edit `Dangerfile` and replace the content with
52
+
53
+ ```ruby
54
+ puts "Running fastlane to generate and upload an ipa file..."
55
+
56
+ options = {
57
+ xcodebuild: {
58
+ workspace: "YourApp.xcworkspace",
59
+ scheme: "YourScheme"
60
+ }
61
+ }
62
+
63
+ require 'fastlane'
64
+ result = Fastlane::OneOff.run(action: "build_and_upload_to_appetize",
65
+ parameters: options)
66
+
67
+ require 'fastlane/actions/device_grid/device_grid'
68
+
69
+ device_grid(
70
+ public_key: result,
71
+ languages: ["en", "de"],
72
+ devices: ["iphone5s", "iphone6splus", "ipadair"]
73
+ )
74
+ ```
75
+
76
+ Make sure to fill in your actual workspace and scheme, or use the `project` parameter `project: "YourApp.xcworkspace"`.
77
+
78
+ ### Try it
79
+
80
+ Push everything to GitHub in its own branch and create a PR to trigger your CI system.
81
+
82
+ ### Make use of deep linking
83
+
84
+ When you submit a PR you usually know what part of your app should be reviewed. Make it easier for everyone by providing a deep link, launching the app at the right point. To do so, use emojis (what else):
85
+
86
+ Add this to the bottom of your PR-body:
87
+
88
+ ```
89
+ :link: com.krausefx.app://bacons/show/937
90
+ ```
91
+
92
+ ### Make use of `NSUserDefaults`
93
+
94
+ To do a runtime check if if the app is running on `Appetize`, just use:
95
+
96
+ ```objective-c
97
+ [[NSUserDefaults standardUserDefaults] objectForKey:@"isAppetize"]
98
+ ```
99
+
100
+ ### Generate `appetize` stream, without the grid
101
+
102
+ Add the following to your `Fastfile` to build and upload your app to `appetize`.
103
+
104
+ ```ruby
105
+ desc "Build your app and upload it to Appetize to stream it in your browser"
106
+ lane :upload_to_appetize do
107
+ build_and_upload_to_appetize(
108
+ xcodebuild: {
109
+ workspace: "YourApp.xcworkspace",
110
+ scheme: "YourScheme"
111
+ }
112
+ )
113
+ end
114
+ ```
115
+
116
+ Run the newly created lane using
117
+
118
+ ```
119
+ fastlane upload_to_appetize
120
+ ```
121
+
122
+ ### Manual way using `appetize_viewing_url_generator`
123
+
124
+ If you want even more control over the way your app is built, you can also manually generate your `.app` and then upload it to `appetize`.
125
+
126
+ Use the `appetize` action together with `appetize_viewing_url_generator`. Make sure to build with the `iphonesimulator` SDK, since `appetize` runs iOS simulators to stream your application.
127
+
128
+ ```ruby
129
+ tmp_path = "/tmp/fastlane_build"
130
+ xcodebuild(
131
+ workspace: "Themoji.xcworkspace",
132
+ sdk: "iphonesimulator",
133
+ scheme: "Themoji",
134
+ derivedDataPath: tmp_path
135
+ )
136
+
137
+ app_path = Dir[File.join(tmp_path, "**", "*.app")].last
138
+ UI.user_error!("Couldn't find app") unless app_path
139
+
140
+ zipped_ipa = zip(path: app_path, output_path: File.join(tmp_path, "Result.zip"))
141
+
142
+ appetize(
143
+ path: zipped_ipa,
144
+ api_token: 'yourapitoken' # get it from https://appetize.io/docs#request-api-token
145
+ )
146
+
147
+ url = appetize_viewing_url_generator(scale: "75", color: "black", public_key: "123123")
148
+ UI.message("Generated URL: #{url}")
149
+ ```
150
+
151
+ #### Disclaimer
152
+
153
+ All product names, logos, and brands are property of their respective owners.
154
+ The used device frames were provided by Facebook via the [Facebook Design Resources](https://facebook.github.io/design/devices.html). `fastlane` is in no way affiliated with Facebook.
155
+
156
+ > While Facebook has redrawn and shares these assets for the benefit of the design community, Facebook does not own any of the underlying product or user interface designs. By accessing these assets, you agree to obtain all necessary permissions from the underlying rights holders and/or adhere to any applicable brand use guidelines before using them. Facebook disclaims all express or implied warranties with respect to these assets, including non-infringement of intellectual property rights.
@@ -0,0 +1,6 @@
1
+ #### Disclaimer
2
+
3
+ All product names, logos, and brands are property of their respective owners.
4
+ The used device frames were provided by Facebook via the [Facebook Design Resources](https://facebook.github.io/design/devices.html). `fastlane` is in no way affiliated with Facebook.
5
+
6
+ > While Facebook has redrawn and shares these assets for the benefit of the design community, Facebook does not own any of the underlying product or user interface designs. By accessing these assets, you agree to obtain all necessary permissions from the underlying rights holders and/or adhere to any applicable brand use guidelines before using them. Facebook disclaims all express or implied warranties with respect to these assets, including non-infringement of intellectual property rights.
@@ -0,0 +1,105 @@
1
+ # rubocop:disable Style/IndentationConsistency
2
+ # We disable this rule since we intend opening HTML labels
3
+ module Danger
4
+ class Dangerfile
5
+ module DSL
6
+ # A danger plugin: https://github.com/danger/danger
7
+ class DeviceGrid < Plugin
8
+ # @param public_key: The key for the Appetize.io
9
+ # @param languages: Array of languages you want to see (e.g. [en, de])
10
+ # @param devices: Array of deviecs you want to see (e.g. ["iphone4s", "ipadair"])
11
+ # @param prefix_command: Prefix the `fastlane run appetize_viewing_url_generator` command with something
12
+ # this can be used to use `bundle exec`
13
+ def run(public_key: nil, languages: nil, devices: nil, prefix_command: nil)
14
+ # since we fetch the URL from the output we don't need colors
15
+ # this will only be changed in the danger sub-process
16
+ fastlane_colors_env = "FASTLANE_DISABLE_COLORS"
17
+ fastlane_colors_were_disabled = ENV.key?(fastlane_colors_env)
18
+ ENV[fastlane_colors_env] = "true"
19
+
20
+ devices ||= %w(iphone4s iphone5s iphone6s iphone6splus ipadair)
21
+ languages ||= ["en"]
22
+ prefix_command = "bundle exec" if File.exist?("Gemfile")
23
+ prefix_command ||= ""
24
+
25
+ deep_link_matches = pr_body.match(/:link:\s(.*)/) # :link: emoji
26
+ deep_link = deep_link_matches[1] if deep_link_matches
27
+
28
+ markdown("<table>")
29
+ languages.each do |current_language|
30
+ markdown("<tr>")
31
+ markdown("<td>")
32
+ markdown("<b>#{current_language[0..1]}</b>")
33
+ markdown("</td>")
34
+
35
+ devices.each do |current_device|
36
+ markdown("<td>")
37
+
38
+ params = {
39
+ public_key: public_key,
40
+ language: current_language,
41
+ device: current_device
42
+ }
43
+ params[:launch_url] = deep_link if deep_link
44
+ params_str = params.collect { |k, v| "#{k}:\"#{v}\"" }.join(" ")
45
+ url = `#{prefix_command} fastlane run appetize_viewing_url_generator #{params_str}`
46
+ url = url.match(%r{Result:.*(https\:\/\/.*)})[1].strip
47
+
48
+ markdown("<a href='#{url}'>")
49
+ markdown("<p align='center'>")
50
+ markdown("<img height='130' src='#{url_for_device(current_device)}' />")
51
+ markdown("<br />")
52
+ markdown(beautiful_device_name(current_device))
53
+ markdown("</p>")
54
+ markdown("</a>")
55
+
56
+ markdown("</td>")
57
+ end
58
+ markdown("</tr>")
59
+ end
60
+ markdown("</table>")
61
+ ensure
62
+ ENV.delete(fastlane_colors_env) unless fastlane_colors_were_disabled
63
+ end
64
+
65
+ def beautiful_device_name(str)
66
+ return {
67
+ iphone4s: "iPhone 4s",
68
+ iphone5s: "iPhone 5s",
69
+ iphone6s: "iPhone 6s",
70
+ iphone6splus: "iPhone 6s Plus",
71
+ ipadair: "iPad Air",
72
+ iphone6: "iPhone 6",
73
+ iphone6plus: "iPhone 6 Plus",
74
+ ipadair2: "iPad Air 2",
75
+ nexus5: "Nexus 5",
76
+ nexus7: "Nexus 7",
77
+ nexus9: "Nexus 9"
78
+ }[str.to_sym] || str.to_s
79
+ end
80
+
81
+ def url_for_device(str)
82
+ str = str.to_sym
83
+ host = "https://raw.githubusercontent.com/fastlane/fastlane/#{Fastlane::VERSION}/fastlane/lib/fastlane/actions/device_grid/assets/"
84
+ return {
85
+ iphone4s: host + "iphone4s.png",
86
+ iphone5s: host + "iphone5s.png",
87
+ iphone6: host + "iphone6s.png",
88
+ iphone6s: host + "iphone6s.png",
89
+ iphone6plus: host + "iphone6splus.png",
90
+ iphone6splus: host + "iphone6splus.png",
91
+ ipadair: host + "ipadair.png",
92
+ ipadair2: host + "ipadair.png"
93
+ }[str] || ""
94
+ end
95
+
96
+ def self.description
97
+ [
98
+ "Render a grid of devices"
99
+ ].join(" ")
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
105
+ # rubocop:enable Style/IndentationConsistency
@@ -8,7 +8,7 @@ module Fastlane
8
8
  paths = params[:path].map(&:shellescape).join(' ')
9
9
  end
10
10
 
11
- result = Actions.sh("git commit -m '#{params[:message]}' #{paths}")
11
+ result = Actions.sh("git commit -m #{params[:message].shellescape} #{paths}")
12
12
  UI.success("Successfully committed \"#{params[:path]}\" 💾.")
13
13
  return result
14
14
  end
@@ -3,6 +3,7 @@ module Fastlane
3
3
  module Actions
4
4
  module SharedValues
5
5
  XCODEBUILD_ARCHIVE = :XCODEBUILD_ARCHIVE
6
+ XCODEBUILD_DERIVED_DATA_PATH = :XCODEBUILD_DERIVED_DATA_PATH
6
7
  end
7
8
 
8
9
  # xcodebuild man page:
@@ -72,6 +73,7 @@ module Fastlane
72
73
 
73
74
  # Set derived data path.
74
75
  params[:derivedDataPath] ||= ENV["XCODE_DERIVED_DATA_PATH"]
76
+ Actions.lane_context[SharedValues::XCODEBUILD_DERIVED_DATA_PATH] = params[:derivedDataPath]
75
77
 
76
78
  # Append slash to build path, if needed
77
79
  if build_path && !build_path.end_with?("/")
@@ -5,7 +5,10 @@ module Fastlane
5
5
  UI.message "Compressing #{params[:path]}..."
6
6
 
7
7
  params[:output_path] ||= "#{params[:path]}.zip"
8
- sh "zip -r #{params[:output_path]} #{params[:path].shellescape}"
8
+
9
+ Dir.chdir(File.expand_path("..", params[:path])) do # required to properly zip
10
+ Actions.sh "zip -r #{params[:output_path].shellescape} #{File.basename(params[:path]).shellescape}"
11
+ end
9
12
 
10
13
  UI.success "Successfully generated zip file at path '#{File.expand_path(params[:output_path])}'"
11
14
  return File.expand_path(params[:output_path])
@@ -20,7 +23,6 @@ module Fastlane
20
23
  end
21
24
 
22
25
  def self.details
23
- "This zips everything in a weird way if you're not in the directory of the file to zip"
24
26
  end
25
27
 
26
28
  def self.available_options
@@ -98,14 +98,6 @@ module Fastlane
98
98
  headings: ['Key', 'Description', 'Env Var', 'Default'],
99
99
  rows: options
100
100
  )
101
- required_count = action.available_options.count do |o|
102
- o.kind_of?(FastlaneCore::ConfigItem) && o.optional == false
103
- end
104
-
105
- if required_count > 0
106
- puts "#{required_count} of the available parameters are required".magenta
107
- puts "They are marked with an asterisk *".magenta
108
- end
109
101
  else
110
102
  puts "No available options".yellow
111
103
  end
@@ -163,8 +155,7 @@ module Fastlane
163
155
  if options.kind_of? Array
164
156
  options.each do |current|
165
157
  if current.kind_of? FastlaneCore::ConfigItem
166
- key_name = (current.optional ? " " : "* ") + current.key.to_s
167
- rows << [key_name.yellow, current.description, current.env_name, current.default_value]
158
+ rows << [current.key.to_s.yellow, current.description, current.env_name, current.default_value]
168
159
  elsif current.kind_of? Array
169
160
  # Legacy actions that don't use the new config manager
170
161
  UI.user_error!("Invalid number of elements in this row: #{current}. Must be 2 or 3") unless [2, 3].include? current.count
@@ -19,7 +19,12 @@ module Fastlane
19
19
 
20
20
  UI.crash!("invalid syntax") unless action_name
21
21
 
22
- class_name = action_name.fastlane_class + 'Action'
22
+ run(action: action_name,
23
+ parameters: action_parameters)
24
+ end
25
+
26
+ def self.run(action: nil, parameters: nil)
27
+ class_name = action.fastlane_class + 'Action'
23
28
  class_ref = nil
24
29
  begin
25
30
  class_ref = Fastlane::Actions.const_get(class_name)
@@ -28,7 +33,7 @@ module Fastlane
28
33
  end
29
34
 
30
35
  r = Runner.new
31
- r.execute_action(action_name, class_ref, [action_parameters], custom_dir: '.')
36
+ r.execute_action(action, class_ref, [parameters], custom_dir: '.')
32
37
  end
33
38
  end
34
39
  end
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '1.84.0'.freeze
2
+ VERSION = '1.85.0'.freeze
3
3
  DESCRIPTION = "The easiest way to automate building and releasing your iOS and Android apps"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.84.0
4
+ version: 1.85.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-03 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: krausefx-shenzhen
@@ -681,6 +681,7 @@ files:
681
681
  - lib/fastlane/actions/add_git_tag.rb
682
682
  - lib/fastlane/actions/appaloosa.rb
683
683
  - lib/fastlane/actions/appetize.rb
684
+ - lib/fastlane/actions/appetize_viewing_url_generator.rb
684
685
  - lib/fastlane/actions/appium.rb
685
686
  - lib/fastlane/actions/appledoc.rb
686
687
  - lib/fastlane/actions/appstore.rb
@@ -688,6 +689,7 @@ files:
688
689
  - lib/fastlane/actions/backup_file.rb
689
690
  - lib/fastlane/actions/backup_xcarchive.rb
690
691
  - lib/fastlane/actions/badge.rb
692
+ - lib/fastlane/actions/build_and_upload_to_appetize.rb
691
693
  - lib/fastlane/actions/bundle_install.rb
692
694
  - lib/fastlane/actions/carthage.rb
693
695
  - lib/fastlane/actions/cert.rb
@@ -710,6 +712,15 @@ files:
710
712
  - lib/fastlane/actions/delete_keychain.rb
711
713
  - lib/fastlane/actions/deliver.rb
712
714
  - lib/fastlane/actions/deploygate.rb
715
+ - lib/fastlane/actions/device_grid/README.md
716
+ - lib/fastlane/actions/device_grid/assets/GridExampleScreenshot.png
717
+ - lib/fastlane/actions/device_grid/assets/README.md
718
+ - lib/fastlane/actions/device_grid/assets/ipadair.png
719
+ - lib/fastlane/actions/device_grid/assets/iphone4s.png
720
+ - lib/fastlane/actions/device_grid/assets/iphone5s.png
721
+ - lib/fastlane/actions/device_grid/assets/iphone6s.png
722
+ - lib/fastlane/actions/device_grid/assets/iphone6splus.png
723
+ - lib/fastlane/actions/device_grid/device_grid.rb
713
724
  - lib/fastlane/actions/dotgpg_environment.rb
714
725
  - lib/fastlane/actions/download.rb
715
726
  - lib/fastlane/actions/download_dsyms.rb
@@ -891,7 +902,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
891
902
  version: '0'
892
903
  requirements: []
893
904
  rubyforge_project:
894
- rubygems_version: 2.4.5.1
905
+ rubygems_version: 2.4.0
895
906
  signing_key:
896
907
  specification_version: 4
897
908
  summary: The easiest way to automate building and releasing your iOS and Android apps