Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
Added fixes from wwfx 0.3.0 to 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Yu committed Jun 4, 2019
1 parent ade0255 commit 4d0fccc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
5 changes: 4 additions & 1 deletion docs/en/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ branch/PR. See also `tk-katana`'s
`docker` version shipped with CentOS 7.
- Will not re-build Docker image if `tk-doc-generator` image exists.
- Force rebuild using `preview_docs.sh --rebuild`.
- Can now be run anywhere, including within `tk-doc-generator`

- `build_docs.sh`: Fixed configurations using absolute paths.
- `build_docs.sh`:
- Fixed configurations using absolute paths.
- Fixed inaccurate echo statements
- `Gemfile*`: Using WWFX `just-the-docs` with
[new external links test](https://github.com/shotgunsoftware/just-the-docs/pull/9)

Expand Down
13 changes: 5 additions & 8 deletions preview_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@ esac

# Setup useful directory variables for current script's folder/parent folder
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
PARENT_DIR="$( cd ${THIS_DIR}/.. >/dev/null 2>&1 && pwd )"


# Build if image does not exist OR first argument is --rebuild
IMAGE_TAG="${IMAGE_TAG:-tk-doc-generator}"
if [ -z "$(docker images --quiet ${IMAGE_TAG})" -o "${ARG1}" == "--rebuild" ]
then
docker build --tag "${IMAGE_TAG}" ${PARENT_DIR}/tk-doc-generator
docker build --tag "${IMAGE_TAG}" ${THIS_DIR}
else
echo "'${IMAGE_TAG}' docker image already built"
echo "To force a re-build, try running this script with --rebuild flag"
Expand All @@ -74,9 +73,9 @@ fi
MOUNT_TO="${MOUNT_TO:-/app}"
if ( docker run --help | grep --quiet -- --mount )
then
MOUNT_FLAGS='--mount '"type=bind,source=${PARENT_DIR},target=${MOUNT_TO}"
MOUNT_FLAGS='--mount '"type=bind,source=$(pwd),target=${MOUNT_TO}"
else
MOUNT_FLAGS='-v '"${PARENT_DIR}:${MOUNT_TO}"
MOUNT_FLAGS='-v '"$(pwd):${MOUNT_TO}"
fi


Expand All @@ -85,10 +84,8 @@ docker run --rm \
${MOUNT_FLAGS} \
${IMAGE_TAG} \
--url="http://localhost" \
--url-path="${PARENT_DIR}/_build" \
--url-path="$(pwd)/_build" \
--source="${MOUNT_TO}/docs" \
--output="${MOUNT_TO}/_build"


echo "Documentation built in ${PARENT_DIR}/_build/index.html"
echo "Be sure to run 'docker container prune' to remove finished containers."
echo "Documentation built. Open in web-browser: $(pwd)/_build/index.html"
7 changes: 3 additions & 4 deletions scripts/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,12 @@ echo "Cleaning out final build location '${OUTPUT}'..."
rm -rf ${OUTPUT}

echo "Creating build location '${TMP_BUILD_FOLDER}'..."
mkdir -p ${TMP_BUILD_FOLDER}
mkdir -p ${TMP_BUILD_FOLDER}/_plugins

echo "Copying source files into '${TMP_FOLDER}'..."
echo "Copying source files into '${TMP_BUILD_FOLDER}'..."
cp -r ${SOURCE}/* ${TMP_BUILD_FOLDER}

echo "Copying plugins into '${TMP_FOLDER}/_plugins'..."
mkdir -p ${TMP_BUILD_FOLDER}/_plugins
echo "Copying plugins into '${TMP_BUILD_FOLDER}/_plugins'..."
cp -nr ${TK_DOC_GEN_SRC}/jekyll/_plugins/* ${TMP_BUILD_FOLDER}/_plugins

echo "Running Sphinx RST -> Markdown build process..."
Expand Down
2 changes: 1 addition & 1 deletion scripts/get-tk-core-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Example:
EOF
}

if [ $# -ne 1 -o ]
if [ $# -ne 1 ]
then
echo 'ERROR: Please provide a folder to download/install into!'
echo
Expand Down

0 comments on commit 4d0fccc

Please sign in to comment.