Lane: commit_and_push_version

Description

Creates a 'Version Bump' commit and push local changes (after increment the build number) to the remote branch

Available

fastlane_configurations ~> 1.0.0

Overview

lane :commit_and_push_version do |options|

  message = options[:message]
  app_name = options[:app_name] || @app_name

  get_build_number

  build_number = lane_context[SharedValues::BUILD_NUMBER]

  commit_version_bump(
    message: message || "Version Bump of #{app_name} to #{build_number} [ci-skip]",
    force: true
  )

  reset_git_repo(
    force: true,
    disregard_gitignore: false
  )
  
  git_pull
  push_to_git_remote
end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

Usage

Update your Fastfile to contain the following code:

commit_and_push_version # simple call with default values
1

Lane Parameters

KeyDescription
messageThe commit message when committing the version bump. Defaults to Version Bump of #{app_name} to #{build_number} [ci-skip]
app_nameThe name of yuor App. Defaults to @app_name (global variable in Fastfile)