Skip to content

Commit

Permalink
Merge pull request #1427 from Automattic/fix/pot-to-php-syntax-error
Browse files Browse the repository at this point in the history
Work around syntax error caused by the pot-to-php script
  • Loading branch information
westonruter authored Sep 13, 2018
2 parents c287abc + ff7c4eb commit a688267
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ module.exports = function( grunt ) {
command: 'cross-env BABEL_ENV=production webpack'
},
pot_to_php: {
command: 'npm run pot-to-php'
command: 'npm run pot-to-php && php -l languages/amp-translations.php'
},
makepot: {
command: 'wp i18n make-pot . languages/amp-js.pot --include="*.js"'
command: 'wp i18n make-pot . languages/amp-js.pot --include="*.js" --file-comment="*/null/*"' // The --file-comment is a temporary workaround for <https://github.com/Automattic/amp-wp/issues/1416>.
},
create_build_zip: {
command: 'if [ ! -e build ]; then echo "Run grunt build first."; exit 1; fi; if [ -e amp.zip ]; then rm amp.zip; fi; cd build; zip -r ../amp.zip .; cd ..; echo; echo "ZIP of build: $(pwd)/amp.zip"'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"main": "blocks/index.js",
"scripts": {
"pot-to-php": "pot-to-php languages/amp-js.pot languages/amp-translations.php amp",
"build": "grunt build; grunt create-build-zip",
"build": "grunt build && grunt create-build-zip",
"deploy": "grunt deploy",
"dev": "cross-env BABEL_ENV=default webpack --watch"
}
Expand Down

0 comments on commit a688267

Please sign in to comment.