Skip to content

Commit

Permalink
Improvements to bump lane
Browse files Browse the repository at this point in the history
  • Loading branch information
jdee committed Dec 21, 2017
1 parent b8bf359 commit 1f8354f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fastlane/lib/actions/version_bump.rb
Expand Up @@ -16,6 +16,8 @@ def run(params)
patch_index_js version
update_pods_in_tests_and_examples
sh "git", "commit", "-a", "-m", "[Fastlane] Version bump to #{version}"
sh "git", "tag", version if params[:tag]
true
end

def available_options
Expand All @@ -41,7 +43,7 @@ def update_package_json(version)
package_json[:version] = version
json_text = JSON.generate(
package_json,
indent: " ",
indent: " " * 2,
object_nl: "\n",
array_nl: "\n",
space: " "
Expand All @@ -52,7 +54,7 @@ def update_package_json(version)

def patch_index_js(version)
PatternPatch::Patch.new(
regexp: /(VERSION = ")\d+\.\d+\.\d+/,
regexp: /(\sVERSION\s*=\s*")\d+\.\d+\.\d+/,
text: "\\1#{version}",
mode: :replace
).apply "src/index.js"
Expand Down

0 comments on commit 1f8354f

Please sign in to comment.