Skip to content

Commit 77248c5

Browse files
committed
Use bash-cache command for .strings validation via version 2.12.0
1 parent 784c2a4 commit 77248c5

File tree

2 files changed

+2
-38
lines changed

2 files changed

+2
-38
lines changed
Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,7 @@
11
#!/bin/bash -eu
22

3-
echo "--- :rubygems: Setting up Gems"
4-
install_gems
5-
6-
echo "--- :cocoapods: Setting up Pods"
7-
install_cocoapods
8-
93
echo "--- :writing_hand: Copy Files"
104
mkdir -pv ~/.configure/wordpress-ios/secrets
115
cp -v fastlane/env/project.env-example ~/.configure/wordpress-ios/secrets/project.env
126

13-
echo "--- Lint Localized Strings Format"
14-
LOGS=logs.txt
15-
set +e
16-
set -o pipefail
17-
bundle exec fastlane generate_strings_file_for_glotpress skip_commit:true | tee $LOGS
18-
EXIT_CODE=$?
19-
set -e
20-
21-
echo $EXIT_CODE
22-
23-
if [[ $EXIT_CODE -ne 0 ]]; then
24-
# Strings generation finished with errors, extract the errors in an easy-to-find section
25-
echo "--- Report genstrings errors"
26-
ERRORS=errors.txt
27-
echo "Found errors when trying to run \`genstrings\` to generate the \`.strings\` files from \`*LocalizedStrings\` calls:" | tee $ERRORS
28-
echo '' >> $ERRORS
29-
# Print the errors inline.
30-
#
31-
# Notice the second `sed` call that removes the ANSI escape sequences that
32-
# Fastlane uses to color the output.
33-
grep -e "\[.*\].*genstrings:" $LOGS \
34-
| sed -e 's/\[.*\].*genstrings: error: /- /' \
35-
| sed -e $'s/\x1b\[[0-9;]*m//g' \
36-
| sort \
37-
| uniq \
38-
| tee -a $ERRORS
39-
# Annotate the build with the errors
40-
cat $ERRORS | buildkite-agent annotate --style error --context genstrings
41-
fi
42-
43-
exit $EXIT_CODE
7+
lint_localized_strings_format

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
common_params:
33
# Common plugin settings to use with the `plugins` key.
44
- &common_plugins
5-
- automattic/bash-cache#2.8.0
5+
- automattic/bash-cache#2.12.0
66
- automattic/git-s3-cache#v1.1.3:
77
bucket: "a8c-repo-mirrors"
88
repo: "wordpress-mobile/wordpress-ios/"

0 commit comments

Comments
 (0)