Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit 5c7660d

Browse files
authored
Merge pull request #37 from BranchMetrics/fix-patches
Fix patches
2 parents 13e5185 + 102c0d6 commit 5c7660d

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

Gemfile.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
fastlane-plugin-branch (0.5.0)
4+
fastlane-plugin-branch (0.5.1)
55
fastlane-plugin-patch
66
plist
77
xcodeproj
@@ -10,7 +10,7 @@ GEM
1010
remote: https://rubygems.org/
1111
specs:
1212
CFPropertyList (2.3.5)
13-
activesupport (4.2.9)
13+
activesupport (4.2.10)
1414
i18n (~> 0.7)
1515
minitest (~> 5.1)
1616
thread_safe (~> 0.3, >= 0.3.4)
@@ -49,9 +49,9 @@ GEM
4949
nap
5050
cocoapods-search (1.0.0)
5151
cocoapods-stats (1.0.0)
52-
cocoapods-trunk (1.2.0)
52+
cocoapods-trunk (1.3.0)
5353
nap (>= 0.8, < 2.0)
54-
netrc (= 0.7.8)
54+
netrc (~> 0.11)
5555
cocoapods-try (1.1.0)
5656
coderay (1.1.2)
5757
colored (1.2)
@@ -75,7 +75,7 @@ GEM
7575
faraday_middleware (0.12.2)
7676
faraday (>= 0.7.4, < 1.0)
7777
fastimage (2.1.0)
78-
fastlane (2.58.0)
78+
fastlane (2.60.1)
7979
CFPropertyList (>= 2.3, < 3.0.0)
8080
addressable (>= 2.3, < 3.0.0)
8181
babosa (>= 1.0.2, < 2.0.0)
@@ -108,7 +108,7 @@ GEM
108108
xcodeproj (>= 1.5.0, < 2.0.0)
109109
xcpretty (>= 0.2.4, < 1.0.0)
110110
xcpretty-travis-formatter (>= 0.0.3)
111-
fastlane-plugin-patch (0.3.0)
111+
fastlane-plugin-patch (0.4.0)
112112
fourflusher (2.0.1)
113113
fuzzy_match (2.0.4)
114114
gh_inspector (1.0.3)
@@ -139,7 +139,7 @@ GEM
139139
little-plugger (~> 1.1)
140140
multi_json (~> 1.10)
141141
memoist (0.16.0)
142-
method_source (0.8.2)
142+
method_source (0.9.0)
143143
mime-types (3.1)
144144
mime-types-data (~> 3.2015)
145145
mime-types-data (3.2016.0521)
@@ -151,16 +151,16 @@ GEM
151151
multipart-post (2.0.0)
152152
nanaimo (0.2.3)
153153
nap (1.1.0)
154-
netrc (0.7.8)
154+
netrc (0.11.0)
155155
os (0.9.6)
156156
parallel (1.12.0)
157157
parser (2.4.0.0)
158158
ast (~> 2.2)
159159
plist (3.3.0)
160160
powerpack (0.1.1)
161-
pry (0.11.0)
161+
pry (0.11.1)
162162
coderay (~> 1.1.0)
163-
method_source (~> 0.8.1)
163+
method_source (~> 0.9.0)
164164
public_suffix (2.0.5)
165165
rainbow (2.2.2)
166166
rake
@@ -193,7 +193,7 @@ GEM
193193
ruby-progressbar (~> 1.7)
194194
unicode-display_width (~> 1.0, >= 1.0.1)
195195
ruby-macho (1.1.0)
196-
ruby-progressbar (1.8.3)
196+
ruby-progressbar (1.9.0)
197197
rubyzip (1.2.1)
198198
security (0.1.3)
199199
signet (0.7.3)
@@ -220,7 +220,7 @@ GEM
220220
unf_ext (0.0.7.4)
221221
unicode-display_width (1.3.0)
222222
word_wrap (1.0.0)
223-
xcodeproj (1.5.1)
223+
xcodeproj (1.5.2)
224224
CFPropertyList (~> 2.3.3)
225225
claide (>= 1.0.2, < 2.0)
226226
colored2 (~> 3.1)

lib/fastlane/plugin/branch/helper/ios_helper.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def patch_app_delegate_swift(project)
371371

372372
Actions::PatchAction.run(
373373
files: app_delegate_swift_path,
374-
regexp: /didFinishLaunchingWithOptions.*\{[^\n]*\n/m,
374+
regexp: /didFinishLaunchingWithOptions.*?\{[^\n]*\n/m,
375375
text: init_session_text,
376376
mode: :append,
377377
offset: 0
@@ -432,7 +432,7 @@ def patch_app_delegate_objc(project)
432432

433433
Actions::PatchAction.run(
434434
files: app_delegate_objc_path,
435-
regexp: /didFinishLaunchingWithOptions.*\{[^\n]*\n/m,
435+
regexp: /didFinishLaunchingWithOptions.*?\{[^\n]*\n/m,
436436
text: init_session_text,
437437
mode: :append,
438438
offset: 0
@@ -473,8 +473,8 @@ def patch_podfile(podfile_path)
473473
# TODO: Improve this patch. Should work in the majority of cases for now.
474474
Actions::PatchAction.run(
475475
files: podfile_path,
476-
regexp: /^\s*pod\s*/,
477-
text: "\npod \"Branch\"",
476+
regexp: /^(\s*)pod\s*/,
477+
text: "\n\\1pod \"Branch\"\n",
478478
mode: :prepend,
479479
offset: 0
480480
)

lib/fastlane/plugin/branch/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Fastlane
22
module Branch
3-
VERSION = "0.5.0"
3+
VERSION = "0.5.1"
44
end
55
end

0 commit comments

Comments
 (0)