fastlane 2.60.0 → 2.60.1
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 +4 -4
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/match/lib/match/git_helper.rb +12 -31
- data/match/lib/match/runner.rb +6 -8
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e99c6cd5377f900c5053f1cce0265fdd06099532
|
|
4
|
+
data.tar.gz: 54ae7e406d3fec4f265c381b71a3453ac4368fba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a81fc252bb56ca9172c8bba1078752013af5cbdc1f076632a9dc138cfdfe673832eee47a1909a331ad73077c6de0827a7b59410184dd6b04f0ed85ff80e36e53
|
|
7
|
+
data.tar.gz: 57709afa9565865de03ed52b0dd69a4484ddd8be78c6a43a6a1e3ed33eb4f1a253102825bcf8b58c1af0b7b8e8de49252e894ab5fe3dd32011791d3e9b7d9f7d
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
module Match
|
|
2
2
|
class GitHelper
|
|
3
|
-
MATCH_VERSION_FILE_NAME = "match_version.txt"
|
|
4
|
-
|
|
5
3
|
def self.clone(git_url,
|
|
6
4
|
shallow_clone,
|
|
7
5
|
manual_password: nil,
|
|
@@ -64,6 +62,7 @@ module Match
|
|
|
64
62
|
return self.clone(git_url, shallow_clone)
|
|
65
63
|
end
|
|
66
64
|
|
|
65
|
+
copy_readme(@dir) unless skip_docs
|
|
67
66
|
Encrypt.new.decrypt_repo(path: @dir, git_url: git_url, manual_password: manual_password)
|
|
68
67
|
|
|
69
68
|
return @dir
|
|
@@ -81,45 +80,21 @@ module Match
|
|
|
81
80
|
end
|
|
82
81
|
|
|
83
82
|
def self.match_version(workspace)
|
|
84
|
-
path = File.join(workspace,
|
|
83
|
+
path = File.join(workspace, "match_version.txt")
|
|
85
84
|
if File.exist?(path)
|
|
86
85
|
Gem::Version.new(File.read(path))
|
|
87
86
|
end
|
|
88
87
|
end
|
|
89
88
|
|
|
90
|
-
def self.commit_changes(path, message, git_url, branch = "master"
|
|
91
|
-
files_to_commmit ||= []
|
|
89
|
+
def self.commit_changes(path, message, git_url, branch = "master")
|
|
92
90
|
Dir.chdir(path) do
|
|
93
91
|
return if `git status`.include?("nothing to commit")
|
|
94
92
|
|
|
95
93
|
Encrypt.new.encrypt_repo(path: path, git_url: git_url)
|
|
96
|
-
|
|
94
|
+
File.write("match_version.txt", Fastlane::VERSION) # unencrypted
|
|
97
95
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
files_to_commmit << MATCH_VERSION_FILE_NAME
|
|
101
|
-
File.write(MATCH_VERSION_FILE_NAME, Fastlane::VERSION) # stored unencrypted
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
template = File.read("#{Match::ROOT}/lib/assets/READMETemplate.md")
|
|
105
|
-
readme_path = "README.md"
|
|
106
|
-
if !File.exist?(readme_path) || File.read(readme_path) != template
|
|
107
|
-
files_to_commmit << readme_path
|
|
108
|
-
File.write(readme_path, template)
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
# `git add` each file we want to commit
|
|
112
|
-
# - Fixes https://github.com/fastlane/fastlane/issues/8917
|
|
113
|
-
# - Fixes https://github.com/fastlane/fastlane/issues/8793
|
|
114
|
-
# - Replaces, closes and fixes https://github.com/fastlane/fastlane/pull/8919
|
|
115
|
-
commands += files_to_commmit.map do |current_file|
|
|
116
|
-
"git add #{current_file.shellescape}"
|
|
117
|
-
end
|
|
118
|
-
else
|
|
119
|
-
# No specific list given, e.g. this happens on `fastlane match nuke`
|
|
120
|
-
# We just want to run `git add -A` to commit everything
|
|
121
|
-
commands << "git add -A"
|
|
122
|
-
end
|
|
96
|
+
commands = []
|
|
97
|
+
commands << "git add -A"
|
|
123
98
|
commands << "git commit -m #{message.shellescape}"
|
|
124
99
|
commands << "GIT_TERMINAL_PROMPT=0 git push origin #{branch.shellescape}"
|
|
125
100
|
|
|
@@ -183,6 +158,12 @@ module Match
|
|
|
183
158
|
return !result.empty?
|
|
184
159
|
end
|
|
185
160
|
|
|
161
|
+
# Copies the README.md into the git repo
|
|
162
|
+
def self.copy_readme(directory)
|
|
163
|
+
template = File.read("#{Match::ROOT}/lib/assets/READMETemplate.md")
|
|
164
|
+
File.write(File.join(directory, "README.md"), template)
|
|
165
|
+
end
|
|
166
|
+
|
|
186
167
|
def self.add_user_config(user_name, user_email)
|
|
187
168
|
# Add git config if needed
|
|
188
169
|
commands = []
|
data/match/lib/match/runner.rb
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
module Match
|
|
2
2
|
class Runner
|
|
3
|
-
attr_accessor :
|
|
3
|
+
attr_accessor :changes_to_commit
|
|
4
4
|
attr_accessor :spaceship
|
|
5
5
|
|
|
6
6
|
def run(params)
|
|
7
|
-
self.files_to_commmit = []
|
|
8
|
-
|
|
9
7
|
FastlaneCore::PrintTable.print_values(config: params,
|
|
10
8
|
hide_keys: [:workspace],
|
|
11
9
|
title: "Summary for match #{Fastlane::VERSION}")
|
|
@@ -52,9 +50,9 @@ module Match
|
|
|
52
50
|
end
|
|
53
51
|
|
|
54
52
|
# Done
|
|
55
|
-
if self.
|
|
53
|
+
if self.changes_to_commit and !params[:readonly]
|
|
56
54
|
message = GitHelper.generate_commit_message(params)
|
|
57
|
-
GitHelper.commit_changes(params[:workspace], message, params[:git_url], params[:git_branch]
|
|
55
|
+
GitHelper.commit_changes(params[:workspace], message, params[:git_url], params[:git_branch])
|
|
58
56
|
end
|
|
59
57
|
|
|
60
58
|
# Print a summary table for each app_identifier
|
|
@@ -83,7 +81,7 @@ module Match
|
|
|
83
81
|
UI.important "Couldn't find a valid code signing identity in the git repo for #{cert_type}... creating one for you now"
|
|
84
82
|
UI.crash!("No code signing identity found and can not create a new one because you enabled `readonly`") if params[:readonly]
|
|
85
83
|
cert_path = Generator.generate_certificate(params, cert_type)
|
|
86
|
-
self.
|
|
84
|
+
self.changes_to_commit = true
|
|
87
85
|
else
|
|
88
86
|
cert_path = certs.last
|
|
89
87
|
UI.message "Installing certificate..."
|
|
@@ -146,7 +144,7 @@ module Match
|
|
|
146
144
|
prov_type: prov_type,
|
|
147
145
|
certificate_id: certificate_id,
|
|
148
146
|
app_identifier: app_identifier)
|
|
149
|
-
self.
|
|
147
|
+
self.changes_to_commit = true
|
|
150
148
|
end
|
|
151
149
|
|
|
152
150
|
installed_profile = FastlaneCore::ProvisioningProfile.install(profile)
|
|
@@ -157,7 +155,7 @@ module Match
|
|
|
157
155
|
if spaceship && !spaceship.profile_exists(username: params[:username], uuid: uuid)
|
|
158
156
|
# This profile is invalid, let's remove the local file and generate a new one
|
|
159
157
|
File.delete(profile)
|
|
160
|
-
|
|
158
|
+
self.changes_to_commit = true
|
|
161
159
|
return nil
|
|
162
160
|
end
|
|
163
161
|
|