Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions run-snapshot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
# This script builds the documentation in a local checkout of the kroxylicious/kroxylicious repository, then incorporates
# the built documentation into a local deployment of the website and serves it on localhost:4000 using ./run.sh.
#
# It is assumed this repository is checked out beside a cloned https://github.com/kroxylicious/kroxylicious/ like:
# .
# ├── kroxylicious
# └── kroxylicious.github.io
#
# if you organize your directories differently, you can set the KROXYLICIOUS_DIR env variable like
# KROXYLICIOUS_DIR=/path/to/my/kroxylicious ./run-snapshot.sh to point it at your kroxylicious dir.

trap "exit" INT
set +euo pipefail
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
KROXYLICIOUS_DIR="${KROXYLICIOUS_DIR:-${SCRIPT_DIR}/../kroxylicious}"
Comment thread
robobario marked this conversation as resolved.
TEST_FILE="${KROXYLICIOUS_DIR}/pom.xml"
if [ ! -f "${TEST_FILE}" ]; then
echo "${TEST_FILE} not found, set KROXYLICIOUS_DIR env var to point to a checkout of https://github.com/kroxylicious/kroxylicious"
exit 1
fi

cd ${KROXYLICIOUS_DIR}
mvn -Dquick -P dist clean package --non-recursive
cp -r target/web/* ${SCRIPT_DIR}
cd ${SCRIPT_DIR}
exec ./run.sh