fastlane 2.157.3 → 2.161.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +72 -72
- data/deliver/lib/deliver/options.rb +17 -1
- data/deliver/lib/deliver/runner.rb +36 -5
- data/deliver/lib/deliver/upload_metadata.rb +36 -6
- data/deliver/lib/deliver/upload_price_tier.rb +7 -2
- data/{pilot/lib/pilot/.manager.rb.swp → fastlane/lib/fastlane/.erb_template_helper.rb.swp} +0 -0
- data/fastlane/lib/fastlane/actions/{.ensure_git_status_clean.rb.swp → .git_commit.rb.swp} +0 -0
- data/fastlane/lib/fastlane/actions/actions_helper.rb +20 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +1 -0
- data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +6 -1
- data/fastlane/lib/fastlane/actions/clean_build_artifacts.rb +1 -0
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/create_app_online.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +3 -2
- data/fastlane/lib/fastlane/actions/docs/run_tests.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +3 -3
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -2
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +2 -2
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +34 -7
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +13 -2
- data/fastlane/lib/fastlane/actions/set_changelog.rb +2 -0
- data/fastlane/lib/fastlane/helper/git_helper.rb +2 -0
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +6 -4
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +1 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +2 -1
- data/fastlane/swift/Appfile.swift +2 -4
- data/fastlane/swift/ArgumentProcessor.swift +2 -6
- data/fastlane/swift/ControlCommand.swift +2 -5
- data/fastlane/swift/Deliverfile.swift +5 -2
- data/fastlane/swift/DeliverfileProtocol.swift +15 -4
- data/fastlane/swift/Fastfile.swift +5 -1
- data/fastlane/swift/Fastlane.swift +2285 -2240
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +5 -5
- data/fastlane/swift/Gymfile.swift +5 -2
- data/fastlane/swift/GymfileProtocol.swift +6 -3
- data/fastlane/swift/LaneFileProtocol.swift +42 -29
- data/fastlane/swift/MainProcess.swift +77 -0
- data/fastlane/swift/Matchfile.swift +5 -2
- data/fastlane/swift/MatchfileProtocol.swift +7 -4
- data/fastlane/swift/Plugins.swift +2 -1
- data/fastlane/swift/Precheckfile.swift +5 -2
- data/fastlane/swift/PrecheckfileProtocol.swift +18 -3
- data/fastlane/swift/RubyCommand.swift +2 -6
- data/fastlane/swift/RubyCommandable.swift +2 -6
- data/fastlane/swift/Runner.swift +5 -9
- data/fastlane/swift/RunnerArgument.swift +2 -6
- data/fastlane/swift/Scanfile.swift +5 -2
- data/fastlane/swift/ScanfileProtocol.swift +6 -3
- data/fastlane/swift/Screengrabfile.swift +5 -2
- data/fastlane/swift/ScreengrabfileProtocol.swift +6 -3
- data/fastlane/swift/Snapshotfile.swift +5 -2
- data/fastlane/swift/SnapshotfileProtocol.swift +6 -3
- data/fastlane/swift/SocketClient.swift +3 -7
- data/fastlane/swift/SocketClientDelegateProtocol.swift +2 -6
- data/fastlane/swift/SocketResponse.swift +2 -6
- data/fastlane/swift/formatting/Brewfile.lock.json +18 -10
- data/fastlane/swift/main.swift +4 -8
- data/fastlane/swift/upgrade_manifest.json +1 -1
- data/frameit/lib/frameit/editor.rb +1 -0
- data/match/lib/match/importer.rb +5 -2
- data/match/lib/match/options.rb +1 -1
- data/match/lib/match/spaceship_ensure.rb +3 -3
- data/pilot/lib/pilot/options.rb +2 -2
- data/precheck/lib/precheck/options.rb +25 -0
- data/precheck/lib/precheck/rule_processor.rb +94 -60
- data/precheck/lib/precheck/runner.rb +26 -5
- data/produce/lib/produce/itunes_connect.rb +2 -0
- data/sigh/lib/sigh/runner.rb +2 -0
- data/snapshot/lib/assets/SnapshotHelper.swift +17 -2
- data/spaceship/README.md +1 -1
- data/spaceship/lib/spaceship/{connect_api/.DS_Store → .DS_Store} +0 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +34 -13
- data/{fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp → spaceship/lib/spaceship/connect_api/models/.app_store_version_submission.rb.swp} +0 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +17 -9
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +1 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +2 -2
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +3 -5
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +3 -5
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +21 -0
- data/spaceship/lib/spaceship/connect_api/spaceship.rb +3 -2
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +29 -9
- data/spaceship/lib/spaceship/helper/net_http_generic_request.rb +11 -5
- metadata +24 -26
- data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
@@ -26,6 +26,7 @@ module Fastlane
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def self.get_build_number(params)
|
29
|
+
# Prompts select team if multiple teams and none specified
|
29
30
|
UI.message("Login to App Store Connect (#{params[:username]})")
|
30
31
|
Spaceship::ConnectAPI.login(params[:username], use_portal: false, use_tunes: true, tunes_team_id: params[:team_id], team_name: params[:team_name])
|
31
32
|
UI.message("Login successful")
|
@@ -17,6 +17,10 @@ module Fastlane
|
|
17
17
|
UI.user_error!(":key_content or :key_filepath is required")
|
18
18
|
end
|
19
19
|
|
20
|
+
# New lines don't get read properly when coming from an ENV
|
21
|
+
# Replacing them literal version with a new line
|
22
|
+
key_content = key_content.gsub('\n', "\n") if key_content
|
23
|
+
|
20
24
|
# This hash matches the named arguments on
|
21
25
|
# the Spaceship::ConnectAPI::Token.create method
|
22
26
|
key = {
|
@@ -27,7 +31,7 @@ module Fastlane
|
|
27
31
|
in_house: in_house
|
28
32
|
}
|
29
33
|
|
30
|
-
Actions.lane_context
|
34
|
+
Actions.lane_context.set_sensitive(SharedValues::APP_STORE_CONNECT_API_KEY, key)
|
31
35
|
|
32
36
|
return key
|
33
37
|
end
|
@@ -55,6 +59,7 @@ module Fastlane
|
|
55
59
|
FastlaneCore::ConfigItem.new(key: :key_content,
|
56
60
|
env_name: "APP_STORE_CONNECT_API_KEY_KEY",
|
57
61
|
description: "The content of the key p8 file",
|
62
|
+
sensitive: true,
|
58
63
|
optional: true,
|
59
64
|
conflicting_options: [:filepath]),
|
60
65
|
FastlaneCore::ConfigItem.new(key: :duration,
|
@@ -23,6 +23,7 @@ module Fastlane
|
|
23
23
|
|
24
24
|
Actions.lane_context[Actions::SharedValues::SIGH_PROFILE_PATHS] = nil
|
25
25
|
Actions.lane_context[Actions::SharedValues::DSYM_PATHS] = nil
|
26
|
+
Actions.lane_context[Actions::SharedValues::DSYM_LATEST_UPLOADED_DATE] = nil
|
26
27
|
|
27
28
|
UI.success('Cleaned up build artifacts 🐙')
|
28
29
|
end
|
@@ -198,7 +198,7 @@ class JUnit4StyleTests {
|
|
198
198
|
|
199
199
|
```
|
200
200
|
|
201
|
-
There is an [example project](https://github.com/fastlane/fastlane/tree/master/screengrab/example/src/androidTest/java/tools/fastlane/localetester) showing how to use
|
201
|
+
There is an [example project](https://github.com/fastlane/fastlane/tree/master/screengrab/example/src/androidTest/java/tools/fastlane/localetester) showing how to use JUnit 3 or 4 and Espresso with the screengrab Java library to capture screenshots during a UI test run.
|
202
202
|
|
203
203
|
Using JUnit 4 is preferable because of its ability to perform actions before and after the entire test class is run. This means you will change the device's locale far fewer times when compared with JUnit 3 running those commands before and after each test method.
|
204
204
|
|
@@ -251,7 +251,7 @@ new CleanStatusBar()
|
|
251
251
|
<details>
|
252
252
|
<summary>Launch Arguments</summary>
|
253
253
|
|
254
|
-
You can provide additional arguments to your
|
254
|
+
You can provide additional arguments to your test cases on launch. These strings will be available in your tests through `InstrumentationRegistry.getArguments()`.
|
255
255
|
|
256
256
|
```ruby
|
257
257
|
screengrab(
|
@@ -251,7 +251,7 @@ to update your `SnapshotHelper.swift` files. In case you modified your `Snapshot
|
|
251
251
|
|
252
252
|
## Launch Arguments
|
253
253
|
|
254
|
-
You can provide additional arguments to your app on launch. These strings will be available in your app (
|
254
|
+
You can provide additional arguments to your app on launch. These strings will be available in your app (e.g. not in the testing target) through `ProcessInfo.processInfo.arguments`. Alternatively, use user-default syntax (`-key value`) and they will be available as key-value pairs in `UserDefaults.standard`.
|
255
255
|
|
256
256
|
```ruby-skip-tests
|
257
257
|
launch_arguments([
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<img src="/img/actions/produce.png" width="250">
|
3
3
|
</p>
|
4
4
|
|
5
|
-
###### Create new iOS apps on App Store Connect and
|
5
|
+
###### Create new iOS apps on App Store Connect and Apple Developer Portal using your command line
|
6
6
|
|
7
7
|
_produce_ creates new iOS apps on both the Apple Developer Portal and App Store Connect with the minimum required information.
|
8
8
|
|
@@ -133,7 +133,7 @@ The general parameters are defined in the `default` key and can be:
|
|
133
133
|
| `stack_title` | Specifies whether _frameit_ should display the keyword above the title when both keyword and title are defined. If it is false, the title and keyword will be displayed side by side when both keyword and title are defined. | `false` |
|
134
134
|
| `title_below_image` | Specifies whether _frameit_ should place the title and optional keyword below the device frame. If it is false, it will be placed above the device frame. | `false` |
|
135
135
|
| `show_complete_frame` | Specifies whether _frameit_ should shrink the device frame so that it is completely shown in the framed screenshot. If it is false, clipping of the device frame might occur at the bottom (when `title_below_image` is `false`) or top (when `title_below_image` is `true`) of the framed screenshot. | `false` |
|
136
|
-
| `padding` | The content of the framed screenshot will be resized to match the specified `padding` around all edges. The vertical padding is also applied between the text and the top or bottom (depending on `title_below_image`) of the device frame. <p> There are 3 different options of
|
136
|
+
| `padding` | The content of the framed screenshot will be resized to match the specified `padding` around all edges. The vertical padding is also applied between the text and the top or bottom (depending on `title_below_image`) of the device frame. <p> There are 3 different options of specifying the padding: <p> 1. Default: An integer value that defines both horizontal and vertical padding in pixels. <br> 2. A string that defines (different) padding values in pixels for horizontal and vertical padding. The syntax is `"<horizontal>x<vertical>"`, e.g. `"30x60"`. <br> 3. A string that defines (different) padding values in percentage for horizontal and vertical padding. The syntax is `"<horizontal>%x<vertical>%"`, e.g. `"5%x10%"`. <br> **Note:** The percentage is calculated from the smallest image dimension (height or width). <p> A combination of option 2 and 3 is possible, e.g. `"5%x40"`. | `50` |
|
137
137
|
| `interline_spacing` | Specifies whether _frameit_ should add or subtract this many pixels between the individual lines of text. This only applies to a multi-line `title` and/or `keyword` to expand or squash together the individual lines of text. | `0` |
|
138
138
|
| `font_scale_factor` | Specifies whether _frameit_ should increase or decrease the font size of the text. Is ignored for `keyword` or `title`, if `font_size` is specified. | `0.1` |
|
139
139
|
| `frame` | Overrides the color of the frame to be used. (Valid values are `BLACK`, `WHITE`, `GOLD` and `ROSE_GOLD`) | NA |
|
@@ -161,9 +161,10 @@ The `keyword` and `title` parameters are both used in `default` and `data`. They
|
|
161
161
|
|
162
162
|
| Key | Description | Default value |
|
163
163
|
|-----|-------------|---------------|
|
164
|
-
| `color` | The font color for the text. Specify a
|
164
|
+
| `color` | The font color for the text. Specify a HEX/HTML color code. | `#000000` (black) |
|
165
165
|
| `font` | The font family for the text. Specify the (relative) path to the font file (e.g. an OpenType Font). | The default `imagemagick` font, which is system dependent. |
|
166
166
|
| `font_size` | The font size for the text specified in points. If not specified or `0`, font will be scaled automatically to fit the available space. _frameit_ still shrinks the text, if it would not fit. | NA |
|
167
|
+
| `font_weight` | The [font weight for the text](https://imagemagick.org/script/command-line-options.php#weight). Specify an integer value (e.g. 900). | NA |
|
167
168
|
| `text` | The text that should be used for the `keyword` or `title`. <p> Note: If you want to use localised text, use [`.strings` files](#strings-files). | NA |
|
168
169
|
|
169
170
|
### Example
|
@@ -81,7 +81,7 @@ _scan_ uses the latest APIs and tools to make running tests plain simple and off
|
|
81
81
|
👱 | Automatically switches to the [travis formatter](https://github.com/kattrali/xcpretty-travis-formatter) when running on Travis
|
82
82
|
📖 | Helps you resolve common test errors like simulator not responding
|
83
83
|
|
84
|
-
_scan_ uses a plain `xcodebuild` command, therefore keeping 100% compatible with `xcodebuild`. To generate the nice output, _scan_ uses [xcpretty](https://github.com/supermarin/xcpretty). You can
|
84
|
+
_scan_ uses a plain `xcodebuild` command, therefore keeping 100% compatible with `xcodebuild`. To generate the nice output, _scan_ uses [xcpretty](https://github.com/supermarin/xcpretty). You can always access the raw output in `~/Library/Logs/scan`.
|
85
85
|
|
86
86
|
![img/actions/scanScreenshot.png](/img/actions/scanScreenshot.png)
|
87
87
|
![img/actions/slack.png](/img/actions/slack.png)
|
@@ -100,7 +100,7 @@ That's all you need to run your tests. If you want more control, here are some a
|
|
100
100
|
fastlane scan --workspace "Example.xcworkspace" --scheme "AppName" --device "iPhone 6" --clean
|
101
101
|
```
|
102
102
|
|
103
|
-
If you need to use a different
|
103
|
+
If you need to use a different Xcode install, use `xcode-select` or define `DEVELOPER_DIR`:
|
104
104
|
|
105
105
|
```no-highlight
|
106
106
|
DEVELOPER_DIR="/Applications/Xcode6.2.app" scan
|
@@ -130,9 +130,9 @@ match
|
|
130
130
|
|
131
131
|
You can find more information about GitHub basic authentication and personal token generation here: [https://developer.github.com/v3/auth/#basic-authentication](https://developer.github.com/v3/auth/#basic-authentication)
|
132
132
|
|
133
|
-
##### Git Storage on Azure
|
133
|
+
##### Git Storage on Azure DevOps
|
134
134
|
|
135
|
-
If you're running a pipeline on Azure
|
135
|
+
If you're running a pipeline on Azure DevOps and using git storage in a another repository on the same project, you might want to use `bearer` token authentication.
|
136
136
|
|
137
137
|
Using parameter:
|
138
138
|
|
@@ -533,7 +533,7 @@ Storing your private keys in a Git repo may sound off-putting at first. We did a
|
|
533
533
|
|
534
534
|
### Google Cloud Storage
|
535
535
|
|
536
|
-
All your keys and provisioning profiles are encrypted using Google managed keys.
|
536
|
+
All your keys and provisioning profiles are encrypted using Google managed keys.
|
537
537
|
|
538
538
|
### What could happen if someone stole a private key?
|
539
539
|
|
@@ -49,7 +49,7 @@ The previous p12 configuration is still currently supported.
|
|
49
49
|
|
50
50
|
## Quick Start
|
51
51
|
|
52
|
-
> Before using _supply_ to connect to Google Play Store, you'll need to set up your app manually first by uploading at least one build to Google Play Store. See [
|
52
|
+
> Before using _supply_ to connect to Google Play Store, you'll need to set up your app manually first by uploading at least one build to Google Play Store. See [fastlane/fastlane#14686](https://github.com/fastlane/fastlane/issues/14686) for more info.
|
53
53
|
|
54
54
|
- `cd [your_project_folder]`
|
55
55
|
- `fastlane supply init`
|
@@ -198,6 +198,6 @@ For more information, see the `fastlane action google_play_track_version_codes`
|
|
198
198
|
- `:check_superseded_tracks`
|
199
199
|
- Google Play will automatically remove releases that are superseded now
|
200
200
|
- `:deactivate_on_promote`
|
201
|
-
- Google Play will automatically
|
201
|
+
- Google Play will automatically deactivate a release from its previous track on promote
|
202
202
|
|
203
203
|
:
|
@@ -32,7 +32,7 @@ For all commands, you can either use an [API Key](#app-store-connect-api-key) or
|
|
32
32
|
|
33
33
|
The App Store Connect API Key is the preferred authentication method (if you are able to use it).
|
34
34
|
|
35
|
-
- Uses
|
35
|
+
- Uses official App Store Connect API
|
36
36
|
- No need for 2FA
|
37
37
|
- Better performance over Apple ID
|
38
38
|
|
@@ -244,7 +244,7 @@ If you are on multiple App Store Connect teams, iTunes Transporter may need a pr
|
|
244
244
|
|
245
245
|
## Use an Application Specific Password to upload
|
246
246
|
|
247
|
-
_pilot_/`upload_to_testflight` can use an [Application Specific Password via the `FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD`
|
247
|
+
_pilot_/`upload_to_testflight` can use an [Application Specific Password via the `FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD` environment variable](https://docs.fastlane.tools/best-practices/continuous-integration/#application-specific-passwords) to upload a binary if both the `skip_waiting_for_build_processing` and `apple_id` options are set. (If any of those are not set, it will use the normal Apple login process that might require 2FA authentication.)
|
248
248
|
|
249
249
|
## Role for App Store Connect User
|
250
250
|
_pilot_/`upload_to_testflight` updates build information and testers after the build has finished processing. App Store Connect requires the "App Manager" or "Admin" role for your Apple account to update this information. The "Developer" role will allow builds to be uploaded but _will not_ allow updating of build information and testers.
|
@@ -2,6 +2,7 @@ module Fastlane
|
|
2
2
|
module Actions
|
3
3
|
module SharedValues
|
4
4
|
DSYM_PATHS = :DSYM_PATHS
|
5
|
+
DSYM_LATEST_UPLOADED_DATE = :DSYM_LATEST_UPLOADED_DATE
|
5
6
|
end
|
6
7
|
class DownloadDsymsAction < Action
|
7
8
|
# rubocop:disable Metrics/PerceivedComplexity
|
@@ -9,7 +10,10 @@ module Fastlane
|
|
9
10
|
require 'openssl'
|
10
11
|
require 'spaceship'
|
11
12
|
require 'net/http'
|
13
|
+
require 'date'
|
12
14
|
|
15
|
+
# Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
|
16
|
+
# Prompts select team if multiple teams and none specified
|
13
17
|
UI.message("Login to App Store Connect (#{params[:username]})")
|
14
18
|
Spaceship::ConnectAPI.login(params[:username], use_portal: false, use_tunes: true)
|
15
19
|
UI.message("Login successful")
|
@@ -28,6 +32,7 @@ module Fastlane
|
|
28
32
|
wait_for_dsym_processing = params[:wait_for_dsym_processing]
|
29
33
|
wait_timeout = params[:wait_timeout]
|
30
34
|
min_version = Gem::Version.new(params[:min_version]) if params[:min_version]
|
35
|
+
after_uploaded_date = DateTime.parse(params[:after_uploaded_date]) unless params[:after_uploaded_date].nil?
|
31
36
|
|
32
37
|
platform = Spaceship::ConnectAPI::Platform.map(itc_platform)
|
33
38
|
|
@@ -79,6 +84,7 @@ module Fastlane
|
|
79
84
|
builds.each do |build|
|
80
85
|
asc_app_version = build.app_version
|
81
86
|
asc_build_number = build.version
|
87
|
+
uploaded_date = DateTime.parse(build.uploaded_date)
|
82
88
|
|
83
89
|
message = []
|
84
90
|
message << "Found train (version): #{asc_app_version}"
|
@@ -95,6 +101,11 @@ module Fastlane
|
|
95
101
|
next
|
96
102
|
end
|
97
103
|
|
104
|
+
if after_uploaded_date && after_uploaded_date >= uploaded_date
|
105
|
+
UI.verbose("Upload date #{after_uploaded_date} not reached: #{uploaded_date}")
|
106
|
+
next
|
107
|
+
end
|
108
|
+
|
98
109
|
message = []
|
99
110
|
message << "Found build version: #{asc_build_number}"
|
100
111
|
message << ", comparing to supplied build_number: #{build_number}" if build_number
|
@@ -106,11 +117,11 @@ module Fastlane
|
|
106
117
|
end
|
107
118
|
|
108
119
|
UI.verbose("Build_version: #{asc_build_number} matches #{build_number}, grabbing dsym_url") if build_number
|
109
|
-
get_details_and_download_dsym(app: app, train: asc_app_version, build_number: asc_build_number, platform: itc_platform, wait_for_dsym_processing: wait_for_dsym_processing, wait_timeout: wait_timeout, output_directory: output_directory)
|
120
|
+
get_details_and_download_dsym(app: app, train: asc_app_version, build_number: asc_build_number, uploaded_date: uploaded_date, platform: itc_platform, wait_for_dsym_processing: wait_for_dsym_processing, wait_timeout: wait_timeout, output_directory: output_directory)
|
110
121
|
end
|
111
122
|
end
|
112
123
|
|
113
|
-
def self.get_details_and_download_dsym(app: nil, train: nil, build_number: nil, platform: nil, wait_for_dsym_processing: nil, wait_timeout: nil, output_directory: nil)
|
124
|
+
def self.get_details_and_download_dsym(app: nil, train: nil, build_number: nil, uploaded_date: nil, platform: nil, wait_for_dsym_processing: nil, wait_timeout: nil, output_directory: nil)
|
114
125
|
start = Time.now
|
115
126
|
download_url = nil
|
116
127
|
|
@@ -142,7 +153,7 @@ module Fastlane
|
|
142
153
|
end
|
143
154
|
|
144
155
|
if download_url
|
145
|
-
self.download(download_url, app.bundle_id, train, build_number, output_directory)
|
156
|
+
self.download(download_url, app.bundle_id, train, build_number, uploaded_date, output_directory)
|
146
157
|
return if build_number
|
147
158
|
else
|
148
159
|
UI.message("No dSYM URL for #{build_number} (#{train})")
|
@@ -157,19 +168,26 @@ module Fastlane
|
|
157
168
|
latest_build = Spaceship::ConnectAPI.get_builds(filter: filter, sort: "-uploadedDate", includes: "preReleaseVersion").first
|
158
169
|
|
159
170
|
if latest_build.nil?
|
160
|
-
UI.user_error!("Could not find latest
|
171
|
+
UI.user_error!("Could not find latest build for version #{version}")
|
161
172
|
end
|
162
173
|
|
163
174
|
return latest_build
|
164
175
|
end
|
165
176
|
|
166
|
-
def self.download(download_url, bundle_id, train_number, build_version, output_directory)
|
177
|
+
def self.download(download_url, bundle_id, train_number, build_version, uploaded_date, output_directory)
|
167
178
|
result = self.download_file(download_url)
|
168
179
|
path = write_dsym(result, bundle_id, train_number, build_version, output_directory)
|
169
180
|
UI.success("🔑 Successfully downloaded dSYM file for #{train_number} - #{build_version} to '#{path}'")
|
170
181
|
|
171
182
|
Actions.lane_context[SharedValues::DSYM_PATHS] ||= []
|
172
183
|
Actions.lane_context[SharedValues::DSYM_PATHS] << File.expand_path(path)
|
184
|
+
|
185
|
+
unless uploaded_date.nil?
|
186
|
+
Actions.lane_context[SharedValues::DSYM_LATEST_UPLOADED_DATE] ||= uploaded_date
|
187
|
+
current_latest = Actions.lane_context[SharedValues::DSYM_LATEST_UPLOADED_DATE]
|
188
|
+
Actions.lane_context[SharedValues::DSYM_LATEST_UPLOADED_DATE] = [current_latest, uploaded_date].max
|
189
|
+
UI.verbose("Most recent build uploaded_date #{Actions.lane_context[SharedValues::DSYM_LATEST_UPLOADED_DATE]}")
|
190
|
+
end
|
173
191
|
end
|
174
192
|
|
175
193
|
def self.write_dsym(data, bundle_id, train_number, build_number, output_directory)
|
@@ -190,6 +208,7 @@ module Fastlane
|
|
190
208
|
else
|
191
209
|
http = Net::HTTP.new(uri.host, uri.port)
|
192
210
|
end
|
211
|
+
http.read_timeout = 300
|
193
212
|
http.use_ssl = (uri.scheme == "https")
|
194
213
|
res = http.get(uri.request_uri)
|
195
214
|
res.body
|
@@ -284,6 +303,12 @@ module Fastlane
|
|
284
303
|
env_name: "DOWNLOAD_DSYMS_MIN_VERSION",
|
285
304
|
description: "The minimum app version for dSYMs you wish to download",
|
286
305
|
optional: true),
|
306
|
+
FastlaneCore::ConfigItem.new(key: :after_uploaded_date,
|
307
|
+
short_option: "-d",
|
308
|
+
env_name: "DOWNLOAD_DSYMS_AFTER_UPLOADED_DATE",
|
309
|
+
description: "The uploaded date after which you wish to download dSYMs",
|
310
|
+
optional: true,
|
311
|
+
is_string: true),
|
287
312
|
FastlaneCore::ConfigItem.new(key: :output_directory,
|
288
313
|
short_option: "-s",
|
289
314
|
env_name: "DOWNLOAD_DSYMS_OUTPUT_DIRECTORY",
|
@@ -308,7 +333,8 @@ module Fastlane
|
|
308
333
|
|
309
334
|
def self.output
|
310
335
|
[
|
311
|
-
['DSYM_PATHS', 'An array to all the zipped dSYM files']
|
336
|
+
['DSYM_PATHS', 'An array to all the zipped dSYM files'],
|
337
|
+
['DSYM_LATEST_UPLOADED_DATE', 'Date of the most recent uploaded time of successfully downloaded dSYM files']
|
312
338
|
]
|
313
339
|
end
|
314
340
|
|
@@ -330,7 +356,8 @@ module Fastlane
|
|
330
356
|
'download_dsyms(version: "1.0.0", build_number: "345")',
|
331
357
|
'download_dsyms(version: "1.0.1", build_number: 42)',
|
332
358
|
'download_dsyms(version: "live")',
|
333
|
-
'download_dsyms(min_version: "1.2.3")'
|
359
|
+
'download_dsyms(min_version: "1.2.3")',
|
360
|
+
'download_dsyms(after_uploaded_date: "2020-09-11T19:00:00+01:00")'
|
334
361
|
]
|
335
362
|
end
|
336
363
|
|
@@ -7,7 +7,13 @@ module Fastlane
|
|
7
7
|
# Raises an exception and stop the lane execution if the repo is not in a clean state
|
8
8
|
class EnsureGitStatusCleanAction < Action
|
9
9
|
def self.run(params)
|
10
|
-
|
10
|
+
if params[:ignored]
|
11
|
+
ignored_file = params[:ignored]
|
12
|
+
repo_status = Actions.sh("git status --porcelain --ignored #{ignored_file}")
|
13
|
+
else
|
14
|
+
repo_status = Actions.sh("git status --porcelain")
|
15
|
+
end
|
16
|
+
|
11
17
|
repo_clean = repo_status.empty?
|
12
18
|
|
13
19
|
if repo_clean
|
@@ -65,7 +71,12 @@ module Fastlane
|
|
65
71
|
description: "The flag whether to show the git diff if the repo is dirty",
|
66
72
|
optional: true,
|
67
73
|
default_value: false,
|
68
|
-
is_string: false)
|
74
|
+
is_string: false),
|
75
|
+
FastlaneCore::ConfigItem.new(key: :ignored,
|
76
|
+
env_name: "FL_ENSURE_GIT_STATUS_CLEAN_IGNORED_FILE",
|
77
|
+
description: "The flag whether to ignore file the git status if the repo is dirty",
|
78
|
+
optional: true,
|
79
|
+
is_string: true)
|
69
80
|
]
|
70
81
|
end
|
71
82
|
|
@@ -4,6 +4,8 @@ module Fastlane
|
|
4
4
|
def self.run(params)
|
5
5
|
require 'spaceship'
|
6
6
|
|
7
|
+
# Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
|
8
|
+
# Prompts select team if multiple teams and none specified
|
7
9
|
UI.message("Login to App Store Connect (#{params[:username]})")
|
8
10
|
Spaceship::ConnectAPI.login(params[:username], use_portal: false, use_tunes: true)
|
9
11
|
UI.message("Login successful")
|
@@ -45,6 +45,8 @@ module Fastlane
|
|
45
45
|
command = %w(git describe)
|
46
46
|
command << '--tags' if match_lightweight
|
47
47
|
command << hash
|
48
|
+
command << '--match' if tag_match_pattern
|
49
|
+
command << tag_match_pattern if tag_match_pattern
|
48
50
|
Actions.sh(*command.compact, log: false).chomp
|
49
51
|
rescue
|
50
52
|
nil
|
@@ -188,6 +188,8 @@ module Fastlane
|
|
188
188
|
|
189
189
|
def write_lanefile(lanefile_implementation_opening: nil, class_name: nil, tool_name: nil)
|
190
190
|
disclaimer = []
|
191
|
+
disclaimer << "// *bait*" # As we are using a custom common header, we have to bait with a random comment so it does not remove important text.
|
192
|
+
disclaimer << ""
|
191
193
|
disclaimer << "// This class is automatically included in FastlaneRunner during build"
|
192
194
|
disclaimer << ""
|
193
195
|
disclaimer << "// This autogenerated file will be overwritten or replaced during build time, or when you initialize `#{tool_name}`"
|
@@ -223,7 +225,7 @@ module Fastlane
|
|
223
225
|
header << "// new group so that it won't be marked for upgrade"
|
224
226
|
header << "//"
|
225
227
|
header << ""
|
226
|
-
header << "class #{tool_detail.swift_class}: #{tool_detail.swift_protocol} {"
|
228
|
+
header << "public class #{tool_detail.swift_class}: #{tool_detail.swift_protocol} {"
|
227
229
|
lanefile_implementation_opening = header.join("\n")
|
228
230
|
|
229
231
|
files_generated << write_lanefile(
|
@@ -284,7 +286,7 @@ func parseInt(fromString: String, function: String = #function) -> Int {
|
|
284
286
|
|
285
287
|
def generate_lanefile_tool_objects(classes: nil)
|
286
288
|
objects = classes.map do |filename|
|
287
|
-
"let #{filename.downcase}: #{filename} = #{filename}()"
|
289
|
+
"public let #{filename.downcase}: #{filename} = #{filename}()"
|
288
290
|
end
|
289
291
|
return objects
|
290
292
|
end
|
@@ -362,12 +364,12 @@ func parseInt(fromString: String, function: String = #function) -> Int {
|
|
362
364
|
protocol_content_array = []
|
363
365
|
protocol_name = tool_swift_function.protocol_name
|
364
366
|
|
365
|
-
protocol_content_array << "protocol #{protocol_name}: class {"
|
367
|
+
protocol_content_array << "public protocol #{protocol_name}: class {"
|
366
368
|
protocol_content_array += tool_swift_function.swift_vars
|
367
369
|
protocol_content_array << "}"
|
368
370
|
protocol_content_array << ""
|
369
371
|
|
370
|
-
protocol_content_array << "extension #{protocol_name} {"
|
372
|
+
protocol_content_array << "public extension #{protocol_name} {"
|
371
373
|
protocol_content_array += tool_swift_function.swift_default_implementations
|
372
374
|
protocol_content_array << "}"
|
373
375
|
protocol_content_array << ""
|
@@ -206,7 +206,7 @@ module Fastlane
|
|
206
206
|
# This just creates a string with as many spaces are necessary given whether or not
|
207
207
|
# the function has a 'discardableResult' annotation, the 'func' keyword, function name
|
208
208
|
# and the opening paren.
|
209
|
-
function_keyword_definition = 'func '
|
209
|
+
function_keyword_definition = 'public func '
|
210
210
|
open_paren = '('
|
211
211
|
closed_paren = ')'
|
212
212
|
indent = ' ' * (discardable_result.length + function_name.length + function_keyword_definition.length + open_paren.length)
|
@@ -1,7 +1,5 @@
|
|
1
|
-
//
|
2
|
-
//
|
3
|
-
// Don't modify this file unless you are familiar with how fastlane's swift code generation works
|
4
|
-
// *** This file will be overwritten or replaced during build time ***
|
1
|
+
// Appfile.swift
|
2
|
+
// Copyright (c) 2020 FastlaneTools
|
5
3
|
|
6
4
|
var appIdentifier: String { return "" } // The bundle identifier of your app
|
7
5
|
var appleID: String { return "" } // Your Apple email address
|