Skip to content

Commit e79de4f

Browse files
committed
Add run-snapshot.sh script
Why: I'm working on the API between the kroxylicious/kroxylicious repository and this repository. This script is a convenient way to incorporate a fresh build of 'target/web' in kroxylicious and run up the development server. Signed-off-by: Robert Young <[email protected]>
1 parent b0ebcb2 commit e79de4f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

run-snapshot.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
# This script builds the documentation in a local checkout of the kroxylicious/kroxylicious repository, then incorporates
3+
# the built documentation into a local deployment of the website and serves it on localhost:4000 using ./run.sh.
4+
#
5+
# It is assumed this repository is checked out beside a cloned https://github.com/kroxylicious/kroxylicious/ like:
6+
# .
7+
# ├── kroxylicious
8+
# └── kroxylicious.github.io
9+
#
10+
# if you organize your directories differently, you can set the KROXYLICIOUS_DIR env variable like
11+
# KROXYLICIOUS_DIR=/path/to/my/kroxylicious ./run-snapshot.sh to point it at your kroxylicious dir.
12+
13+
trap "exit" INT
14+
set +euo pipefail
15+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
16+
KROXYLICIOUS_DIR="${KROXYLICIOUS_DIR:-${SCRIPT_DIR}/../kroxylicious}"
17+
TEST_FILE="${KROXYLICIOUS_DIR}/pom.xml"
18+
if [ ! -f "${TEST_FILE}" ]; then
19+
echo "${TEST_FILE} not found, set KROXYLICIOUS_DIR env var to point to a checkout of https://github.com/kroxylicious/kroxylicious"
20+
exit 1
21+
fi
22+
23+
cd ${KROXYLICIOUS_DIR}
24+
mvn -Dquick -P dist clean package --non-recursive
25+
cp -r target/web/* ${SCRIPT_DIR}
26+
cd ${SCRIPT_DIR}
27+
exec ./run.sh

0 commit comments

Comments
 (0)