-
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathupload-catalog
More file actions
25 lines (23 loc) · 864 Bytes
/
upload-catalog
File metadata and controls
25 lines (23 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
set -eux
# clone an additional repository
cd "${BASEDIR}"
git clone --branch ${CATALOG_BRANCH} https://github.com/python-doc-ja/cpython-doc-catalog.git cpython-doc-catalog
mkdir -p "${BASEDIR}"/cpython-doc-catalog/Doc/locales/ja
cd "${BASEDIR}"/cpython-doc-catalog/Doc/locales/ja
ln -s "${BASEDIR}"/python-docs-ja LC_MESSAGES
ls -lF LC_MESSAGES
# upload catalogs to python-docs-ja
cd "${BASEDIR}"/cpython-doc-catalog/Doc/locales
tx pull --force --language ja
cd ja/LC_MESSAGES
git add *.po **/*.po
git status
if [[ $(git status --short | wc -l) == 0 ]]; then
echo "no .po file to upload"
else
echo "I have .po file(s) to upload"
git commit --message="[skip ci] Update .po files"
git push --quiet "git@python-docs-ja.github.com:python/python-docs-ja.git" ${DOCS_BRANCH}:${DOCS_BRANCH}
fi
rm -rf "${BASEDIR}"/cpython-doc-catalog/Doc/locales/ja