Skip to content

Commit 93565b0

Browse files
committed
Add skip_commit option to generate_strings_file_for_glotpress
1 parent f500dad commit 93565b0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

fastlane/Fastfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,8 +976,15 @@ platform :ios do
976976
configure_validate
977977
end
978978

979+
# Generates the `.strings` file to be imported by GlotPress, by parsing source code (using `genstrings` under the hood).
980+
#
981+
#
982+
# @option [Boolean] skip_commit (default: false) If true, does not commit the changes made to the `.strings` file.
983+
#
984+
# @called_by complete_code_freeze
985+
#
979986
desc 'Updates the main `Localizable.strings` file — that will be imported by GlotPress — from code and `Info.plist` files'
980-
lane :generate_strings_file_for_glotpress do
987+
lane :generate_strings_file_for_glotpress do |options|
981988
cocoapods
982989

983990
en_lproj_path = File.join(RESOURCES_FOLDER, 'en.lproj')
@@ -1006,6 +1013,8 @@ platform :ios do
10061013
destination: File.join(en_lproj_path, 'Localizable.strings')
10071014
)
10081015

1016+
next if options.fetch(:skip_commit, false)
1017+
10091018
git_commit(
10101019
path: en_lproj_path,
10111020
message: 'Freeze strings for localization',

0 commit comments

Comments
 (0)