2020-08-18 06:09:28 -04:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
2021-08-12 11:54:36 -04:00
|
|
|
SCRIPT_PATH=$(realpath "${BASH_SOURCE[0]}")
|
|
|
|
SCRIPT_DIR=$(dirname "$SCRIPT_PATH")
|
|
|
|
WEB_DIR=$(dirname "$SCRIPT_DIR")
|
|
|
|
|
|
|
|
cd "$WEB_DIR"
|
2021-08-03 10:32:13 -04:00
|
|
|
|
2020-08-18 06:09:28 -04:00
|
|
|
if [[ `git status --porcelain=2 locales/` ]]; then
|
|
|
|
git add locales/*
|
|
|
|
git commit -m "auto update translation"
|
2021-08-12 11:54:36 -04:00
|
|
|
# Switch the cloudbuild clone from https to ssh authentication.
|
|
|
|
git remote set-url --push origin git@github.com:overleaf/internal.git
|
|
|
|
git push origin "HEAD:$BRANCH_NAME"
|
2020-08-18 06:09:28 -04:00
|
|
|
else
|
|
|
|
echo 'No changes'
|
|
|
|
fi
|