Merge pull request #579 from evandroforks/fix_msgmerge_not_failing_on_error

Fix msgmerge not failing on error
This commit is contained in:
Damien Elmes 2020-04-27 19:05:27 +10:00 committed by GitHub
commit 3c36b7cf81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -64,6 +64,9 @@ jobs:
# https://stackoverflow.com/questions/43175529/updating-make-version-4-1-on-mac
echo "::set-env name=PATH::/usr/local/opt/make/libexec/gnubin:$PATH"
# https://stackoverflow.com/questions/59644349/msgmerge-on-macos-catalina
echo "::set-env name=PATH::/usr/local/opt/gettext/bin:$PATH"
- name: Configure Windows environment variables
if: matrix.os == 'windows-latest'
run: |
@ -213,7 +216,6 @@ jobs:
run: |
set -x
brew install portaudio protobuf gettext ripgrep make
brew link gettext --force
- name: Set up python
uses: actions/setup-python@v1

View File

@ -15,7 +15,8 @@ do
perl -pe "s%repo/desktop/(.*)/anki.po%$targetDir/\1/LC_MESSAGES%")
outfile="$outdir/anki.mo"
mkdir -p $outdir
(msgmerge -q "$file" repo/desktop/anki.pot | msgfmt - --output-file="$outfile") || (
echo "error building $file"
)
if ! msgmerge -q "$file" repo/desktop/anki.pot | msgfmt - --output-file="$outfile"; then
echo "error building $file";
exit 1;
fi;
done