-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathprepare-build_3.8
31 lines (26 loc) · 1015 Bytes
/
prepare-build_3.8
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
26
27
28
29
30
31
#!/bin/bash
set -eux
ls -la ${BASEDIR}
git config --global user.email "[email protected]"
git config --global user.name "Autobuild bot on TravisCI"
git checkout ${DOCS_BRANCH}
# extract secrets
cd ~
openssl aes-256-cbc -K ${encryption_38_K} -iv ${encryption_38_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