Skip to content

Commit

Permalink
Support an optional argument --skip_update_translations #763
Browse files Browse the repository at this point in the history
  • Loading branch information
ryosuketc committed Nov 13, 2020
1 parent 4ca92b3 commit 3d8f63a
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions tools/server_tests
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,26 @@ pushd "$(dirname $0)" >/dev/null && source common.sh && popd >/dev/null
# directory.
cd "$(dirname $0)/.."

# Parse arguments and set flags
SKIP_UPDATE_TRANSLATIONS='false'
for arg in "$@"; do
shift
if [[ "${arg}" == "--skip_update_translations" ]]; then
SKIP_UPDATE_TRANSLATIONS='true'
continue
fi
# All arguments other than "--skip_update_translations" remains intact
set -- "$@" "${arg}"
done
readonly SKIP_UPDATE_TRANSLATIONS

echo
echo "--- Updating translations"
$TOOLS_DIR/update_messages
if [[ "${SKIP_UPDATE_TRANSLATIONS}" == 'true' ]]; then
echo "--- Skipped updating translations"
else
echo "--- Updating translations"
"${TOOLS_DIR}"/update_messages
fi

echo
echo "--- Running server tests"
Expand Down

0 comments on commit 3d8f63a

Please sign in to comment.