Skip to content

Commit b2e2342

Browse files
committed
Use submodule for generated docs
1 parent ce0b77b commit b2e2342

5 files changed

Lines changed: 19 additions & 43 deletions

File tree

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
[submodule "cmake"]
22
path = cmake
33
url = git://github.com/dlech/vala-cmake-modules
4+
[submodule "doc/sphinx/_html_extra"]
5+
path = doc/sphinx/_html_extra
6+
url = https://github.com/ev3dev/ev3devKit.git
7+
branch = html-extra

doc/sphinx/_html_extra

Submodule _html_extra added at 272fb2e

doc/sphinx/conf.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,6 @@
2929

3030
on_rtd = os.getenv('READTHEDOCS') == 'True'
3131

32-
if on_rtd:
33-
# Download and extract non-sphinx docs
34-
rtd_version = os.getenv('READTHEDOCS_VERSION')
35-
if os.path.exists('_extra'):
36-
shutil.rmtree('_extra')
37-
os.mkdir('_extra')
38-
r = requests.get('https://github.com/ev3dev/ev3devKit/archive/vala-api-docs/' + rtd_version + '.tar.gz')
39-
r.raise_for_status()
40-
t = tarfile.open(fileobj=StringIO.StringIO(r.content))
41-
t.extractall('_extra')
42-
os.rename('_extra/ev3devKit-vala-api-docs-' + rtd_version, '_extra/vala-api')
43-
44-
html_extra_path = ['_extra']
45-
4632

4733
# -- General configuration ------------------------------------------------
4834

@@ -123,6 +109,8 @@
123109
# so a file named "default.css" will overwrite the builtin "default.css".
124110
#html_static_path = ['_static']
125111

112+
html_extra_path = ['_html_extra']
113+
126114

127115
# -- Options for HTMLHelp output ------------------------------------------
128116

release-doc.sh

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,18 @@
44

55
set -e
66

7-
GIT_REMOTE_URL=git@github.com:ev3dev/ev3devKit
8-
DOC_DIR=valadoc
9-
LANG=vala
7+
base_dir=$(dirname $(readlink -f $0))
8+
build_dir=${base_dir}/doc-build
9+
html_extra_dir=${base_dir}/doc/sphinx/_html_extra
1010

11-
RTD_VERSION=$1
12-
RTD_VERSION2=$2
11+
rm -rf ${html_extra_dir}/vala-api
1312

14-
if [ ! -n "$RTD_VERSION" ]; then
15-
echo "must specify version for readthedocs.org"
16-
exit 1
17-
fi
13+
mkdir -p ${html_extra_dir}/vala-api
1814

19-
mkdir build-doc
20-
cd build-doc
21-
cmake -D CMAKE_BUILD_TYPE=Release ..
22-
make doc
23-
mkdir git
24-
cd git
25-
git init
26-
git remote add origin $GIT_REMOTE_URL
27-
git checkout -b $LANG-api-docs/$RTD_VERSION
28-
cp -R ../$DOC_DIR/* .
29-
git add .
30-
git commit -m "documentation"
31-
git push --force origin $LANG-api-docs/$RTD_VERSION
32-
if [ -n "$RTD_VERSION2" ]; then
33-
git push --force origin HEAD:$LANG-api-docs/$RTD_VERSION2
34-
fi
35-
cd ../..
36-
rm -rf build-doc
15+
rm -rf ${build_dir}
16+
cmake -D CMAKE_BUILD_TYPE=Release -B${build_dir} -H${base_dir}
17+
make -s -C ${build_dir} doc
18+
19+
cp -R ${build_dir}/valadoc/* ${html_extra_dir}/vala-api
20+
21+
rm -rf ${build_dir}

release.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ version=$(dpkg-parsechangelog -S Version)
99
distribution=$(dpkg-parsechangelog -S Distribution)
1010
codename=$(debian-distro-info --codename --${distribution})
1111

12-
./release-doc.sh ${version} stable
13-
1412
OS=debian DIST=${codename} ARCH=amd64 pbuilder-ev3dev build
1513
OS=debian DIST=${codename} ARCH=i386 PBUILDER_OPTIONS="--binary-arch" pbuilder-ev3dev build
1614
OS=debian DIST=${codename} ARCH=armhf PBUILDER_OPTIONS="--binary-arch" pbuilder-ev3dev build

0 commit comments

Comments
 (0)