February 2018
Intermediate to advanced
346 pages
9h 56m
English
ensure_git_branch (https://docs.fastlane.tools/actions/ensure_git_branch/#ensure_git_branch) is used to assert that the action is being run from within a specific Git branch, and is used by teams to enforce specific development branching models, such as the Gitflow workflow (https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow), and raise an exception and stop lane execution if the developer isn't working from a specific branch. You will need to pass a mandatory parameter branch to specify what branch the code repository needs to be in, as shown in the following code:
lane :testing do
..
ensure_git_branch(branch:"stage")
..
Read now
Unlock full access