Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34
Tidy up build scripts#21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
ls -la ${BASEDIR} | ||
git config --global user.email "travisci-build-bot@example.com" | ||
git config --global user.name "Autobuild bot on TravisCI" | ||
git checkout ${DOCS_BRANCH} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Travis CIの動作の関係上、PRビルドでは上手く動かないため、いったんマージする。 | ||
# extract secrets | ||
cd ~ | ||
openssl aes-256-cbc -K ${encryption_37_K} -iv ${encryption_37_iv} -in "${BASEDIR}/python-docs-ja/secrets_${DOCS_BRANCH}.tar.enc" -out ~/secrets_${DOCS_BRANCH}.tar -d | ||
tar xvf ~/secrets_${DOCS_BRANCH}.tar | ||
rm ~/secrets_${DOCS_BRANCH}.tar | ||
chmod 600 ~/.ssh/python-docs-ja_${DOCS_BRANCH} | ||
chmod 600 ~/.ssh/cpython-doc-catalog_${CATALOG_BRANCH} | ||
# enable using plural deploy keys for repositories | ||
# Hack from: https://gist.github.com/jamesmcfadden/d379e04e7ae2861414886af189ec59e5 | ||
cat <<EOF >> ~/.ssh/config | ||
Host python-docs-ja.github.com | ||
HostName github.com | ||
IdentityFile ~/.ssh/python-docs-ja_${DOCS_BRANCH} | ||
StrictHostKeyChecking no | ||
Host cpython-doc-catalog.github.com | ||
HostName github.com | ||
IdentityFile ~/.ssh/cpython-doc-catalog_${CATALOG_BRANCH} | ||
StrictHostKeyChecking no | ||
EOF | ||
cat ~/.ssh/config |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# merge from upstream | ||
cd"${BASEDIR}"/cpython-doc-catalog | ||
git remote add upstream https://github.com/python/cpython.git | ||
git remote -v | ||
git fetch --quiet upstream | ||
git merge --no-ff upstream/${CPYTHON_BRANCH} -m"Merge remote-tracking branch 'upstream/${CPYTHON_BRANCH}' into${CATALOG_BRANCH} by Autobuild bot on TravisCI" | ||
# generate catalog | ||
cd Doc | ||
make build ALLSPHINXOPTS="-E -b gettext -D gettext_compact=0 -d build/.doctrees . locales/pot" | ||
ls -lt locales/pot | ||
# upload catalog templates to cpython-doc-catalog | ||
cd locales | ||
git add pot | ||
if [$(git status -s| wc -l)-eq 0 ];then | ||
echo"no .pot file to update" | ||
exit 0 | ||
fi | ||
echo"I have .pot file(s) to upload" | ||
rm -rf .tx | ||
sphinx-intl create-txconfig | ||
sphinx-intl update-txconfig-resources --transifex-project-name=${TRANSIFEX_PROJECT} --locale-dir. --pot-dir pot | ||
tx push -s | ||
git add .tx | ||
git commit --message="[skip ci] Update .pot files and .tx/config" | ||
git push --quiet"git@cpython-doc-catalog.github.com:python-doc-ja/cpython-doc-catalog.git"${CATALOG_BRANCH}:${CATALOG_BRANCH} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# clone an additional repository | ||
cd "${BASEDIR}" | ||
git clone --depth 50 --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) -eq 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 |