Remove readthedocs
This commit is contained in:
@@ -8,7 +8,7 @@ do
|
||||
module=`basename "${path}"`
|
||||
printf "Check $module ... "
|
||||
cookiecutter --no-input cookiecutter-module -o "${OUTPUT}" module_name="${module}"
|
||||
for file in tox.ini .readthedocs.yaml doc/conf.py doc/requirements-doc.txt
|
||||
for file in tox.ini doc/conf.py doc/requirements-doc.txt
|
||||
do
|
||||
cmp "${path}/${file}" "${OUTPUT}/${module}/${file}"
|
||||
done
|
||||
|
||||
@@ -12,11 +12,6 @@ check-doc-${name}:
|
||||
variables:
|
||||
PACKAGE: ${package}
|
||||
|
||||
trigger-doc-build-${name}:
|
||||
extends: .trigger-doc-build
|
||||
variables:
|
||||
PACKAGE: ${package}
|
||||
|
||||
test-${name}-sqlite:
|
||||
extends: .test-sqlite
|
||||
variables:
|
||||
|
||||
@@ -3,7 +3,9 @@ set -eu
|
||||
|
||||
OUTPUTDIR=`realpath "${1}"`
|
||||
mkdir -p "${OUTPUTDIR}"
|
||||
export DOC_BASE_URL=$OUTPUTDIR
|
||||
: ${DOC_BASE_URL:=${OUTPUTDIR}}
|
||||
: ${MAX_PROCS:=$(( `nproc` * 2 ))}
|
||||
export DOC_BASE_URL
|
||||
|
||||
requirements=$(mktemp /tmp/requirements-doc-XXXXXXXXXX.txt)
|
||||
find . -name 'cookiecutter*' -prune -o -path '*/doc/requirements-doc.txt' -exec cat {} + | sort | uniq > "${requirements}"
|
||||
@@ -22,8 +24,10 @@ pip install -r "${requirements}"
|
||||
package="client-library"
|
||||
elif [ "${package}" = "trytond-gis" ]; then
|
||||
package="backend-gis"
|
||||
elif [ "${package}" = "." ]; then
|
||||
package=""
|
||||
else
|
||||
package="modules-${package}"
|
||||
fi
|
||||
echo "${path}/doc" "${OUTPUTDIR}/${package}"
|
||||
done) | xargs --max-args=2 --max-procs=$(( `nproc` * 2)) python -m sphinx -Q -T -E -b html
|
||||
done) | xargs --max-args=2 --max-procs=${MAX_PROCS} python -m sphinx -Q -T -E -b html
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Requires $RTD_CONFIG to point to a file providing the webhook data for each
|
||||
# package. The file is in Python cfg file format.
|
||||
# Each section defines on package. Example::
|
||||
#
|
||||
# [modules/party]
|
||||
# url: https://readthedocs.org/api/v2/webhook/modules-party/12345/
|
||||
# token: 93afe1ce2d1107597f69774009964990c0643dad
|
||||
|
||||
import configparser
|
||||
import sys
|
||||
from argparse import ArgumentParser
|
||||
from urllib import request
|
||||
from urllib.parse import urlencode
|
||||
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument('--config', '-c', required=True)
|
||||
parser.add_argument('--package', '-p', required=True)
|
||||
parser.add_argument('--branches', '-b', nargs='*')
|
||||
args = parser.parse_args()
|
||||
|
||||
cfg = configparser.ConfigParser()
|
||||
cfg.read(args.config)
|
||||
|
||||
url = cfg.get(args.package, 'url')
|
||||
token = cfg.get(args.package, 'token')
|
||||
if not url:
|
||||
sys.exit(f"Missing url for {args.package!r}")
|
||||
elif not token:
|
||||
sys.exit(f"Missing token for {args.package!r}")
|
||||
|
||||
data = [
|
||||
('token', token),
|
||||
*(('branches', branch) for branch in args.branches),
|
||||
]
|
||||
|
||||
req = request.Request(
|
||||
url,
|
||||
data=urlencode(data).encode(),
|
||||
headers={
|
||||
'User-Agent': 'python-urllib/%s' % request.__version__,
|
||||
})
|
||||
with request.urlopen(req) as resp:
|
||||
print(resp.read())
|
||||
Reference in New Issue
Block a user