File: build.sh

package info (click to toggle)
jupyterlab 4.0.11%2Bds1%2B~cs11.25.27-7
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 43,496 kB
  • sloc: javascript: 18,395; python: 8,932; sh: 399; makefile: 95; perl: 33; xml: 1
file content (37 lines) | stat: -rwxr-xr-x 1,239 bytes parent folder | download
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
32
33
34
35
36
37
#!/usr/bin/env bash
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.


# get this script's parent dir
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

# set some project dirs
SOURCE=$DIR/source
BUILD=$SOURCE/_build
PKG_ROOT=$(realpath $DIR/..)
MONOREPO_DEVDOC=$(realpath $PKG_ROOT/../../docs/source/developer)

# echo "SOURCE=$SOURCE"
# echo "BUILD=$BUILD"
# echo "PKG_ROOT=$PKG_ROOT"
# echo "MONOREPO_DEVDOC=$MONOREPO_DEVDOC"

# make the docs build dir
mkdir -p $BUILD

# paths in rst include directives are resolved relative to pwd
pushd $SOURCE > /dev/null

# make a copy of labicon.rst with section levels shifted down
pandoc $SOURCE/labicon.rst -f rst -t rst --wrap=preserve --shift-heading-level-by=1 -o $BUILD/labicon.rst

# make the README.md at package root
pandoc $SOURCE/generated_warning.rst $SOURCE/README.rst -f rst -t gfm -o $PKG_ROOT/README.md    #--resource-path=$SOURCE
echo "built $PKG_ROOT/README.md"

# make the dev docs for the monorepo's docs
pandoc $SOURCE/generated_warning.rst $SOURCE/ui_components.rst -f rst -t rst --wrap=preserve -o $MONOREPO_DEVDOC/ui_components.rst
echo "built $MONOREPO_DEVDOC/ui_components.rst"

popd > /dev/null