fastlane 2.132.0.beta.20190916200055 → 2.132.0.beta.20190921200021
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +20 -1
- data/fastlane/lib/fastlane/actions/ensure_env_vars.rb +58 -0
- data/fastlane/lib/fastlane/actions/onesignal.rb +59 -29
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/match/lib/match/options.rb +6 -0
- data/match/lib/match/runner.rb +1 -0
- data/match/lib/match/storage/git_storage.rb +8 -2
- data/snapshot/lib/snapshot/reports_generator.rb +3 -0
- metadata +15 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9a1370c917620f6b6c1343a7c77d36be8f56b48
|
4
|
+
data.tar.gz: 6b12512f2c5a89b7a44f7d488f9a76924603ebcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb7b0fbdcfc4223bedb37c6cebba6e6df517f200bcf26089e2ce7af8a470975ad8ff7b9465738b683c5051a2cf6b3711dbcdd08a72da240c2169d256629c12b3
|
7
|
+
data.tar.gz: 017fdafd04e914ffc94f1572a30bd2b7c0f0c8077de032f80f8d7697e9fddb491bce20d4e0f14e6767280bb12925235720afc5fa6bd8d436ee5a45f47c21b001
|
@@ -79,7 +79,7 @@ You'll be asked if you want to store your code signing identities inside a **Git
|
|
79
79
|
|
80
80
|
Use Git Storage to store all code signing identities in a private git repo, owned and operated by you. The files will be encrypted using OpenSSL.
|
81
81
|
|
82
|
-
First, enter the URL to your private (!) Git repo (You can create one for free on e.g. [GitHub](https://github.com/new) or [BitBucket](https://bitbucket.org/repo/create)). The URL you enter can be either a `https://` or a `git` URL.
|
82
|
+
First, enter the URL to your private (!) Git repo (You can create one for free on e.g. [GitHub](https://github.com/new) or [BitBucket](https://bitbucket.org/repo/create)). The URL you enter can be either a `https://` or a `git` URL. `fastlane match init` won't read or modify your certificates or profiles yet, and also won't validate your git URL.
|
83
83
|
|
84
84
|
This will create a `Matchfile` in your current directory (or in your `./fastlane/` folder).
|
85
85
|
|
@@ -92,6 +92,25 @@ app_identifier("tools.fastlane.app")
|
|
92
92
|
username("user@fastlane.tools")
|
93
93
|
```
|
94
94
|
|
95
|
+
##### Git Storage on GitHub
|
96
|
+
|
97
|
+
If your machine is currently using SSH to authenticate with GitHub, you'll want to use a `git` URL, otherwise, you may see an authentication error when you attempt to use match. Alternatively, you can set a basic authorization for _match_:
|
98
|
+
|
99
|
+
Using parameter:
|
100
|
+
|
101
|
+
```
|
102
|
+
math(git_basic_authorization: '<YOUR KEY>')
|
103
|
+
```
|
104
|
+
|
105
|
+
Using environment variable:
|
106
|
+
|
107
|
+
```
|
108
|
+
ENV['MATCH_GIT_BASIC_AUTHORIZATION'] = '<YOUR KEY>'
|
109
|
+
match
|
110
|
+
```
|
111
|
+
|
112
|
+
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)
|
113
|
+
|
95
114
|
#### Google Cloud Storage
|
96
115
|
|
97
116
|
Use [Google Cloud Storage](https://cloud.google.com/storage/) for a fully hosted solution for your code signing identities. Certificates are stored on Google Cloud, encrypted using Google managed keys. Everything will be stored on your Google account, inside a storage bucket you provide. You can also directly access the files using the web console.
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class EnsureEnvVarsAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
variables = params[:env_vars]
|
6
|
+
|
7
|
+
variables.each do |variable|
|
8
|
+
next unless ENV[variable].to_s.strip.empty?
|
9
|
+
|
10
|
+
UI.user_error!("Missing environment variable '#{variable}'")
|
11
|
+
end
|
12
|
+
|
13
|
+
is_one = variables.length == 1
|
14
|
+
|
15
|
+
UI.success("Environment variable#{is_one ? '' : 's'} '#{variables.join('\', \'')}' #{is_one ? 'is' : 'are'} set!")
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.description
|
19
|
+
'Raises an exception if the specified env vars are not set'
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.details
|
23
|
+
'This action will check if some environment variables are set.'
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.available_options
|
27
|
+
[
|
28
|
+
FastlaneCore::ConfigItem.new(key: :env_vars,
|
29
|
+
description: 'The environment variables names that should be checked',
|
30
|
+
type: Array,
|
31
|
+
verify_block: proc do |value|
|
32
|
+
UI.user_error!('Specify at least one environment variable name') if value.empty?
|
33
|
+
end)
|
34
|
+
]
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.authors
|
38
|
+
['revolter']
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.example_code
|
42
|
+
[
|
43
|
+
'ensure_env_vars(
|
44
|
+
env_vars: [\'GITHUB_USER_NAME\', \'GITHUB_API_TOKEN\']
|
45
|
+
)'
|
46
|
+
]
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.category
|
50
|
+
:misc
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.is_supported?(platform)
|
54
|
+
true
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -11,15 +11,26 @@ module Fastlane
|
|
11
11
|
require 'uri'
|
12
12
|
require 'base64'
|
13
13
|
|
14
|
-
|
14
|
+
app_id = params[:app_id].to_s.strip
|
15
15
|
auth_token = params[:auth_token]
|
16
|
-
app_name = params[:app_name]
|
16
|
+
app_name = params[:app_name].to_s
|
17
17
|
apns_p12_password = params[:apns_p12_password]
|
18
18
|
android_token = params[:android_token]
|
19
19
|
android_gcm_sender_id = params[:android_gcm_sender_id]
|
20
20
|
|
21
|
+
has_app_id = !app_id.empty?
|
22
|
+
has_app_name = !app_name.empty?
|
23
|
+
|
24
|
+
is_update = has_app_id
|
25
|
+
|
26
|
+
UI.user_error!('Please specify the `app_id` or the `app_name` parameters!') if !has_app_id && !has_app_name
|
27
|
+
|
28
|
+
UI.message("Parameter App ID: #{app_id}") if has_app_id
|
29
|
+
UI.message("Parameter App name: #{app_name}") if has_app_name
|
30
|
+
|
21
31
|
payload = {}
|
22
|
-
|
32
|
+
|
33
|
+
payload['name'] = app_name if has_app_name
|
23
34
|
|
24
35
|
unless params[:apns_p12].nil?
|
25
36
|
data = File.read(params[:apns_p12])
|
@@ -33,61 +44,70 @@ module Fastlane
|
|
33
44
|
payload["gcm_key"] = android_token unless android_token.nil?
|
34
45
|
payload["android_gcm_sender_id"] = android_gcm_sender_id unless android_gcm_sender_id.nil?
|
35
46
|
|
36
|
-
# here's the actual lifting - POST to OneSignal
|
47
|
+
# here's the actual lifting - POST or PUT to OneSignal
|
37
48
|
|
38
49
|
json_headers = { 'Content-Type' => 'application/json', 'Authorization' => "Basic #{auth_token}" }
|
39
|
-
|
50
|
+
url = +'https://onesignal.com/api/v1/apps'
|
51
|
+
url << '/' + app_id if is_update
|
52
|
+
uri = URI.parse(url)
|
40
53
|
http = Net::HTTP.new(uri.host, uri.port)
|
41
54
|
http.use_ssl = true
|
42
|
-
|
55
|
+
|
56
|
+
if is_update
|
57
|
+
response = http.put(uri.path, payload.to_json, json_headers)
|
58
|
+
else
|
59
|
+
response = http.post(uri.path, payload.to_json, json_headers)
|
60
|
+
end
|
61
|
+
|
43
62
|
response_body = JSON.parse(response.body)
|
44
63
|
|
45
64
|
Actions.lane_context[SharedValues::ONE_SIGNAL_APP_ID] = response_body["id"]
|
46
65
|
Actions.lane_context[SharedValues::ONE_SIGNAL_APP_AUTH_KEY] = response_body["basic_auth_key"]
|
47
66
|
|
48
|
-
check_response_code(response)
|
67
|
+
check_response_code(response, is_update)
|
49
68
|
end
|
50
69
|
|
51
|
-
def self.check_response_code(response)
|
70
|
+
def self.check_response_code(response, is_update)
|
52
71
|
case response.code.to_i
|
53
72
|
when 200, 204
|
54
|
-
|
73
|
+
UI.success("Successfully #{is_update ? 'updated' : 'created new'} OneSignal app")
|
55
74
|
else
|
56
75
|
UI.user_error!("Unexpected #{response.code} with response: #{response.body}")
|
57
76
|
end
|
58
77
|
end
|
59
78
|
|
60
79
|
def self.description
|
61
|
-
"Create a new [OneSignal](https://onesignal.com/) application"
|
80
|
+
"Create or update a new [OneSignal](https://onesignal.com/) application"
|
62
81
|
end
|
63
82
|
|
64
83
|
def self.details
|
65
|
-
"You can use this action to automatically create a OneSignal application. You can also upload a `.p12` with password, a GCM key, or both."
|
84
|
+
"You can use this action to automatically create or update a OneSignal application. You can also upload a `.p12` with password, a GCM key, or both."
|
66
85
|
end
|
67
86
|
|
68
87
|
def self.available_options
|
69
88
|
[
|
70
|
-
FastlaneCore::ConfigItem.new(key: :
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
unless value.to_s.length > 0
|
76
|
-
UI.error("Please add 'ENV[\"ONE_SIGNAL_AUTH_KEY\"] = \"your token\"' to your Fastfile's `before_all` section.")
|
77
|
-
UI.user_error!("No ONE_SIGNAL_AUTH_KEY given.")
|
78
|
-
end
|
79
|
-
end),
|
89
|
+
FastlaneCore::ConfigItem.new(key: :app_id,
|
90
|
+
env_name: "ONE_SIGNAL_APP_ID",
|
91
|
+
sensitive: true,
|
92
|
+
description: "OneSignal App ID. Setting this updates an existing app",
|
93
|
+
optional: true),
|
80
94
|
|
81
|
-
FastlaneCore::ConfigItem.new(key: :
|
82
|
-
env_name: "
|
83
|
-
|
95
|
+
FastlaneCore::ConfigItem.new(key: :auth_token,
|
96
|
+
env_name: "ONE_SIGNAL_AUTH_KEY",
|
97
|
+
sensitive: true,
|
98
|
+
description: "OneSignal Authorization Key",
|
84
99
|
verify_block: proc do |value|
|
85
|
-
|
86
|
-
UI.error("Please add 'ENV[\"
|
87
|
-
UI.user_error!("No
|
100
|
+
if value.to_s.empty?
|
101
|
+
UI.error("Please add 'ENV[\"ONE_SIGNAL_AUTH_KEY\"] = \"your token\"' to your Fastfile's `before_all` section.")
|
102
|
+
UI.user_error!("No ONE_SIGNAL_AUTH_KEY given.")
|
88
103
|
end
|
89
104
|
end),
|
90
105
|
|
106
|
+
FastlaneCore::ConfigItem.new(key: :app_name,
|
107
|
+
env_name: "ONE_SIGNAL_APP_NAME",
|
108
|
+
description: "OneSignal App Name. This is required when creating an app (in other words, when `:app_id` is not set, and optional when updating an app",
|
109
|
+
optional: true),
|
110
|
+
|
91
111
|
FastlaneCore::ConfigItem.new(key: :android_token,
|
92
112
|
env_name: "ANDROID_TOKEN",
|
93
113
|
description: "ANDROID GCM KEY",
|
@@ -121,8 +141,8 @@ module Fastlane
|
|
121
141
|
|
122
142
|
def self.output
|
123
143
|
[
|
124
|
-
['ONE_SIGNAL_APP_ID', 'The
|
125
|
-
['ONE_SIGNAL_APP_AUTH_KEY', 'The auth token for the newly created
|
144
|
+
['ONE_SIGNAL_APP_ID', 'The app ID of the newly created or updated app'],
|
145
|
+
['ONE_SIGNAL_APP_AUTH_KEY', 'The auth token for the newly created or updated app']
|
126
146
|
]
|
127
147
|
end
|
128
148
|
|
@@ -144,6 +164,16 @@ module Fastlane
|
|
144
164
|
apns_p12: "Path to Apple .p12 file (optional)",
|
145
165
|
apns_p12_password: "Password for .p12 file (optional)",
|
146
166
|
apns_env: "production/sandbox (defaults to production)"
|
167
|
+
)',
|
168
|
+
'onesignal(
|
169
|
+
app_id: "Your OneSignal App ID",
|
170
|
+
auth_token: "Your OneSignal Auth Token",
|
171
|
+
app_name: "New Name for OneSignal App",
|
172
|
+
android_token: "Your Android GCM key (optional)",
|
173
|
+
android_gcm_sender_id: "Your Android GCM Sender ID (optional)",
|
174
|
+
apns_p12: "Path to Apple .p12 file (optional)",
|
175
|
+
apns_p12_password: "Password for .p12 file (optional)",
|
176
|
+
apns_env: "production/sandbox (defaults to production)"
|
147
177
|
)'
|
148
178
|
]
|
149
179
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Fastlane
|
2
|
-
VERSION = '2.132.0.beta.
|
2
|
+
VERSION = '2.132.0.beta.20190921200021'.freeze
|
3
3
|
DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
|
4
4
|
MINIMUM_XCODE_RELEASE = "7.0".freeze
|
5
5
|
RUBOCOP_REQUIREMENT = '0.49.1'.freeze
|
data/match/lib/match/options.rb
CHANGED
@@ -115,6 +115,12 @@ module Match
|
|
115
115
|
description: "Clone just the branch specified, instead of the whole repo. This requires that the branch already exists. Otherwise the command will fail",
|
116
116
|
is_string: false,
|
117
117
|
default_value: false),
|
118
|
+
FastlaneCore::ConfigItem.new(key: :git_basic_authorization,
|
119
|
+
env_name: "MATCH_GIT_BASIC_AUTHORIZATION",
|
120
|
+
sensitive: true,
|
121
|
+
description: "Use a basic authorization header to access the git repo (e.g.: access via HTTPS, GitHub Actions, etc)",
|
122
|
+
optional: true,
|
123
|
+
default_value: nil),
|
118
124
|
|
119
125
|
# Storage: Google Cloud
|
120
126
|
FastlaneCore::ConfigItem.new(key: :google_cloud_bucket_name,
|
data/match/lib/match/runner.rb
CHANGED
@@ -37,6 +37,7 @@ module Match
|
|
37
37
|
git_full_name: params[:git_full_name],
|
38
38
|
git_user_email: params[:git_user_email],
|
39
39
|
clone_branch_directly: params[:clone_branch_directly],
|
40
|
+
git_basic_authorization: params[:git_basic_authorization],
|
40
41
|
type: params[:type].to_s,
|
41
42
|
platform: params[:platform].to_s,
|
42
43
|
google_cloud_bucket_name: params[:google_cloud_bucket_name].to_s,
|
@@ -17,6 +17,7 @@ module Match
|
|
17
17
|
attr_accessor :clone_branch_directly
|
18
18
|
attr_accessor :type
|
19
19
|
attr_accessor :platform
|
20
|
+
attr_accessor :git_basic_authorization
|
20
21
|
|
21
22
|
def self.configure(params)
|
22
23
|
return self.new(
|
@@ -28,7 +29,8 @@ module Match
|
|
28
29
|
branch: params[:git_branch],
|
29
30
|
git_full_name: params[:git_full_name],
|
30
31
|
git_user_email: params[:git_user_email],
|
31
|
-
clone_branch_directly: params[:clone_branch_directly]
|
32
|
+
clone_branch_directly: params[:clone_branch_directly],
|
33
|
+
git_basic_authorization: params[:git_basic_authorization]
|
32
34
|
)
|
33
35
|
end
|
34
36
|
|
@@ -40,7 +42,8 @@ module Match
|
|
40
42
|
branch: "master",
|
41
43
|
git_full_name: nil,
|
42
44
|
git_user_email: nil,
|
43
|
-
clone_branch_directly: false
|
45
|
+
clone_branch_directly: false,
|
46
|
+
git_basic_authorization: nil)
|
44
47
|
self.git_url = git_url
|
45
48
|
self.shallow_clone = shallow_clone
|
46
49
|
self.skip_docs = skip_docs
|
@@ -48,6 +51,7 @@ module Match
|
|
48
51
|
self.git_full_name = git_full_name
|
49
52
|
self.git_user_email = git_user_email
|
50
53
|
self.clone_branch_directly = clone_branch_directly
|
54
|
+
self.git_basic_authorization = git_basic_authorization
|
51
55
|
|
52
56
|
self.type = type if type
|
53
57
|
self.platform = platform if platform
|
@@ -65,6 +69,8 @@ module Match
|
|
65
69
|
self.working_directory = Dir.mktmpdir
|
66
70
|
|
67
71
|
command = "git clone #{self.git_url.shellescape} #{self.working_directory.shellescape}"
|
72
|
+
command << " -c http.extraheader='AUTHORIZATION: basic #{self.git_basic_authorization.shellescape}'" unless self.git_basic_authorization.nil?
|
73
|
+
|
68
74
|
if self.shallow_clone
|
69
75
|
command << " --depth 1 --no-single-branch"
|
70
76
|
elsif self.clone_branch_directly
|
@@ -77,6 +77,9 @@ module Snapshot
|
|
77
77
|
{
|
78
78
|
# snapshot in Xcode 9 saves screenshots with the SIMULATOR_DEVICE_NAME
|
79
79
|
# which includes spaces
|
80
|
+
'iPhone 11 Pro Max' => "iPhone 11 Pro Max",
|
81
|
+
'iPhone 11 Pro' => "iPhone 11 Pro",
|
82
|
+
'iPhone 11' => "iPhone 11",
|
80
83
|
'iPhone XS Max' => "iPhone XS Max",
|
81
84
|
'iPhone XS' => "iPhone XS",
|
82
85
|
'iPhone XR' => "iPhone XR",
|
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: 2.132.0.beta.
|
4
|
+
version: 2.132.0.beta.20190921200021
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew McBurney
|
@@ -27,7 +27,7 @@ authors:
|
|
27
27
|
autorequire:
|
28
28
|
bindir: bin
|
29
29
|
cert_chain: []
|
30
|
-
date: 2019-09-
|
30
|
+
date: 2019-09-21 00:00:00.000000000 Z
|
31
31
|
dependencies:
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: slack-notifier
|
@@ -1060,6 +1060,7 @@ files:
|
|
1060
1060
|
- fastlane/lib/fastlane/actions/dsym_zip.rb
|
1061
1061
|
- fastlane/lib/fastlane/actions/echo.rb
|
1062
1062
|
- fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
|
1063
|
+
- fastlane/lib/fastlane/actions/ensure_env_vars.rb
|
1063
1064
|
- fastlane/lib/fastlane/actions/ensure_git_branch.rb
|
1064
1065
|
- fastlane/lib/fastlane/actions/ensure_git_status_clean.rb
|
1065
1066
|
- fastlane/lib/fastlane/actions/ensure_no_debug_code.rb
|
@@ -1746,24 +1747,24 @@ metadata:
|
|
1746
1747
|
post_install_message:
|
1747
1748
|
rdoc_options: []
|
1748
1749
|
require_paths:
|
1749
|
-
- fastlane_core/lib
|
1750
1750
|
- scan/lib
|
1751
|
-
-
|
1751
|
+
- deliver/lib
|
1752
|
+
- fastlane_core/lib
|
1753
|
+
- spaceship/lib
|
1754
|
+
- produce/lib
|
1755
|
+
- fastlane/lib
|
1752
1756
|
- gym/lib
|
1757
|
+
- match/lib
|
1758
|
+
- sigh/lib
|
1759
|
+
- credentials_manager/lib
|
1760
|
+
- cert/lib
|
1753
1761
|
- frameit/lib
|
1762
|
+
- pem/lib
|
1754
1763
|
- supply/lib
|
1755
|
-
-
|
1756
|
-
- match/lib
|
1764
|
+
- screengrab/lib
|
1757
1765
|
- pilot/lib
|
1758
|
-
- spaceship/lib
|
1759
|
-
- snapshot/lib
|
1760
|
-
- fastlane/lib
|
1761
|
-
- pem/lib
|
1762
1766
|
- precheck/lib
|
1763
|
-
-
|
1764
|
-
- credentials_manager/lib
|
1765
|
-
- deliver/lib
|
1766
|
-
- produce/lib
|
1767
|
+
- snapshot/lib
|
1767
1768
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1768
1769
|
requirements:
|
1769
1770
|
- - ">="
|