Skip to content

Commit f46aa09

Browse files
committed
Run git_add when extracting localizations
I noticed this edge case in the 21.1 release cycle, where we sent a new file, the `InfoPlist.strings` for the Jetpack save to draft extension, to GlotPress for translation and the automation failed because it downloaded the new localizations and could not commit them.
1 parent c9dec51 commit f46aa09

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fastlane/lanes/localization.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@
247247
source_parent_dir: parent_dir_for_lprojs,
248248
target_original_files: MANUALLY_MAINTAINED_STRINGS_FILES
249249
)
250+
# Manually add files in case there are entirely new localization files.
251+
# Fastlane's `git_commit` can only commit changes to existing files.
252+
git_add(path: modified_files, shell_escape: false)
250253
git_commit(
251254
path: modified_files,
252255
message: 'Update app translations – Other `.strings`',

0 commit comments

Comments
 (0)