From b6fa5f5b3356cb07e84e5b1c263bbff8a59d4daf Mon Sep 17 00:00:00 2001 From: Dave Page Date: Fri, 31 Mar 2017 12:13:30 -0400 Subject: [PATCH] Add message catalog builds to CI, and run all tests from a runner script to enable test/build addition purely from the source tree. --- ci/ci_runner.sh | 27 +++++++++++++++++++++++++++ ci/update_messages.sh | 15 +++++++++++++++ 2 files changed, 42 insertions(+) create mode 100755 ci/ci_runner.sh create mode 100755 ci/update_messages.sh diff --git a/ci/ci_runner.sh b/ci/ci_runner.sh new file mode 100755 index 000000000..a434fbe87 --- /dev/null +++ b/ci/ci_runner.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +WD=${CWD} + +$WORKSPACE/ci/create_config.sh || { echo 'Failed to create the configuration.' ; exit 1; } +cd $WD + +$WORKSPACE/ci/run_python_tests.sh || { echo 'Error detected when running the Python tests.' ; exit 1; } +cd $WD + +$WORKSPACE/ci/run_jasmine_tests.sh || { echo 'Error detected when running the Jasmine tests.' ; exit 1; } +cd $WD + +$WORKSPACE/ci/build_docs.sh || { echo 'Failed to build the documentation.' ; exit 1; } +cd $WD + +$WORKSPACE/ci/build_runtime_qt4.sh || { echo 'Failed to build the QT4 runtime.' ; exit 1; } +cd $WD + +$WORKSPACE/ci/build_runtime_qt5.sh || { echo 'Failed to build the QT5 runtime.' ; exit 1; } +cd $WD + +$WORKSPACE/ci/build_pip_wheel.sh || { echo 'Failed to build the PIP wheel.' ; exit 1; } +cd $WD + +$WORKSPACE/ci/build_tarballs.sh || { echo 'Failed to build the tarballs.' ; exit 1; } +cd $WD \ No newline at end of file diff --git a/ci/update_messages.sh b/ci/update_messages.sh new file mode 100755 index 000000000..539b71ded --- /dev/null +++ b/ci/update_messages.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +echo "################################################################################" +echo "Extracting, merging and compiling strings..." +echo "################################################################################" +echo + +. $WORKSPACE/pgadmin-venv/bin/activate +cd $WORKSPACE/web + +pybabel extract -F babel.cfg -o pgadmin/messages.pot pgadmin || { echo 'Failed to extract messages from the source code.' ; exit 1; } + +pybabel update -i pgadmin/messages.pot -d pgadmin/translations || { echo 'Failed to update message catalogs from the template.' ; exit 1; } + +pybabel compile -d pgadmin/translations || { echo 'Failed to compile the message catalogs.' ; exit 1 \ No newline at end of file