Update provisioning/release scripts to build `.mo` files.

We need to update provision.py to compile the messages files, since
they are needed for the new i18n tests.  And of course we need to
include the .mo files in release tarballs; there's a bit of complexity
there around how the tarball archives are created.
This commit is contained in:
Umair Khan 2016-05-02 13:20:00 +05:00 committed by Tim Abbott
parent f35327d148
commit e56d3196ef
5 changed files with 8 additions and 1 deletions

1
.gitattributes vendored
View File

@ -18,3 +18,4 @@
/frontend_tests export-ignore
/node_modules export-ignore
/humbug export-ignore
/locale export-ignore

View File

@ -341,6 +341,7 @@ if [ $(uname) = "OpenBSD" ]; then sudo cp ./puppet/zulip/files/postgresql/zulip_
./tools/do-destroy-rebuild-database
./tools/postgres-init-test-db
./tools/do-destroy-rebuild-test-database
./manage.py compilemessages
npm install
```

View File

@ -185,6 +185,7 @@ def main():
run(["tools/do-destroy-rebuild-database"])
run(["tools/postgres-init-test-db"])
run(["tools/do-destroy-rebuild-test-database"])
run(["python", "./manage.py", "compilemessages"])
# Install the latest npm.
run(["sudo", "npm", "install", "-g", "npm"])
# Run npm install last because it can be flaky, and that way one

View File

@ -83,7 +83,7 @@ find prod-static/serve/third/gemoji/images/emoji/ -regex '.*\.[0-9a-f]+\.png' -d
cd "$TMPDIR"
tar --append -f "$TARBALL" "$prefix/prod-static" "$prefix/build_id" "$prefix/version"
tar --append -f "$TARBALL" "$prefix/prod-static" "$prefix/build_id" "$prefix/version" "$prefix/locale"
rm -rf "$prefix"

View File

@ -45,6 +45,10 @@ subprocess.check_call(['bash', '-ex', 'tools/download-zxcvbn'],
subprocess.check_call(['python', './manage.py', 'collectstatic', '--noinput'],
stdout=fp, stderr=fp)
# Compile translation strings to generate `.mo` files.
subprocess.check_call(['python', './manage.py', 'compilemessages'],
stdout=fp, stderr=fp)
# Move the source maps out of the serve/ directory and into their
# proper place.
subprocess.check_call(['rm', '-rf', 'prod-static/source-map'],