Skip to content

Commit 1f8354f

Browse files
committed
Improvements to bump lane
1 parent b8bf359 commit 1f8354f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fastlane/lib/actions/version_bump.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ def run(params)
1616
patch_index_js version
1717
update_pods_in_tests_and_examples
1818
sh "git", "commit", "-a", "-m", "[Fastlane] Version bump to #{version}"
19+
sh "git", "tag", version if params[:tag]
20+
true
1921
end
2022

2123
def available_options
@@ -41,7 +43,7 @@ def update_package_json(version)
4143
package_json[:version] = version
4244
json_text = JSON.generate(
4345
package_json,
44-
indent: " ",
46+
indent: " " * 2,
4547
object_nl: "\n",
4648
array_nl: "\n",
4749
space: " "
@@ -52,7 +54,7 @@ def update_package_json(version)
5254

5355
def patch_index_js(version)
5456
PatternPatch::Patch.new(
55-
regexp: /(VERSION = ")\d+\.\d+\.\d+/,
57+
regexp: /(\sVERSION\s*=\s*")\d+\.\d+\.\d+/,
5658
text: "\\1#{version}",
5759
mode: :replace
5860
).apply "src/index.js"

0 commit comments

Comments
 (0)