-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathios_git_helper.rb
More file actions
28 lines (26 loc) · 921 Bytes
/
ios_git_helper.rb
File metadata and controls
28 lines (26 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module Fastlane
module Helper
module Ios
# Helper methods to execute git-related operations that are specific to iOS projects
#
module GitHelper
# Commit the files that are modified when we bump version numbers on an iOS project
#
# This typically commits:
# - The files in `./config/*` – especially `Version.*.xcconfig` files
#
# @env PROJECT_ROOT_FOLDER The path to the git root of the project
#
def self.commit_version_bump
files_list = [File.join(get_from_env!(key: 'PROJECT_ROOT_FOLDER'), 'config', '.')]
Fastlane::Helper::GitHelper.commit(message: 'Bump version number', files: files_list)
end
def self.get_from_env!(key:)
ENV.fetch(key) do
UI.user_error! "Could not find value for \"#{key}\" in environment."
end
end
end
end
end
end