mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 15:47:17 +00:00
Refactor baseimage building to baseimage.sh
This commit is contained in:
parent
d86f6affac
commit
f563022aa8
@ -39,6 +39,27 @@ baseimage::release() {
|
|||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
baseimage::builddocs() {
|
||||||
|
mount_point="/mnt/docs"
|
||||||
|
|
||||||
|
docker run --rm \
|
||||||
|
-ti \
|
||||||
|
-v "${BASEIMAGE_PATH}"/docs:"${mount_point}" \
|
||||||
|
"${BASEIMAGE_NAME}" \
|
||||||
|
/bin/bash -c \
|
||||||
|
"cd ${mount_point}
|
||||||
|
pip3 install sphinx
|
||||||
|
make html
|
||||||
|
exit" \
|
||||||
|
&> /dev/null
|
||||||
|
|
||||||
|
if [ "$?" == "0" ]; then
|
||||||
|
echo "Built baseimage docs at ${BASEIMAGE_PATH}/docs/build/html!"
|
||||||
|
else
|
||||||
|
echo "Building baseimage docs failed!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
releasename() {
|
releasename() {
|
||||||
local version
|
local version
|
||||||
local date
|
local date
|
||||||
|
24
hack/tfw.sh
24
hack/tfw.sh
@ -79,28 +79,6 @@ start_test()
|
|||||||
wait
|
wait
|
||||||
}
|
}
|
||||||
|
|
||||||
build_docs()
|
|
||||||
{
|
|
||||||
mount_point="/mnt/docs"
|
|
||||||
|
|
||||||
docker run --rm \
|
|
||||||
-ti \
|
|
||||||
-v "$BASEIMAGE_PATH"/docs:"$mount_point" \
|
|
||||||
"$BASEIMAGE_NAME" \
|
|
||||||
/bin/bash -c \
|
|
||||||
"cd $mount_point
|
|
||||||
pip3 install sphinx
|
|
||||||
make html
|
|
||||||
exit" \
|
|
||||||
&> /dev/null
|
|
||||||
|
|
||||||
if [ "$?" == "0" ]; then
|
|
||||||
echo "Built baseimage docs at ${BASEIMAGE_PATH}/docs/build/html!"
|
|
||||||
else
|
|
||||||
echo "Building baseimage docs failed!"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
case ${1:-} in
|
case ${1:-} in
|
||||||
start)
|
start)
|
||||||
RUN_FRONTEND=1 start_test ${@:2}
|
RUN_FRONTEND=1 start_test ${@:2}
|
||||||
@ -127,7 +105,7 @@ case ${1:-} in
|
|||||||
[[ -d "$BASEIMAGE_PATH" ]] && baseimage::release
|
[[ -d "$BASEIMAGE_PATH" ]] && baseimage::release
|
||||||
;;
|
;;
|
||||||
builddocs)
|
builddocs)
|
||||||
build_docs
|
baseimage::builddocs
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: tfw.sh [start|buildtfw|build|buildwithfrontend|releasetfw]"
|
echo "Usage: tfw.sh [start|buildtfw|build|buildwithfrontend|releasetfw]"
|
||||||
|
Loading…
Reference in New Issue
Block a user