run formatters

This commit is contained in:
urob 2024-04-08 21:55:45 -04:00
parent 3aed3a0bd6
commit c7107524a3
6 changed files with 304 additions and 296 deletions

View file

@ -7,48 +7,48 @@
# Parse input arguments
while [[ $# -gt 0 ]]; do
case $1 in
# needed when user isn't in docker group
-s|--sudu)
SUDO="sudo"
;;
# needed when user isn't in docker group
-s | --sudu)
SUDO="sudo"
;;
-c|--clear-cache)
CLEAR_CACHE="true"
;;
-c | --clear-cache)
CLEAR_CACHE="true"
;;
-d|--install-doc-tools)
DOC_TOOLS="true"
;;
-d | --install-doc-tools)
DOC_TOOLS="true"
;;
-v|--version)
ZEPHYR_VERSION="$2"
shift
;;
-v | --version)
ZEPHYR_VERSION="$2"
shift
;;
--host-config-dir)
HOST_CONFIG_DIR="$2"
shift
;;
--host-config-dir)
HOST_CONFIG_DIR="$2"
shift
;;
--host-zmk-dir)
HOST_ZMK_DIR="$2"
shift
;;
--host-zmk-dir)
HOST_ZMK_DIR="$2"
shift
;;
--docker-config-dir)
DOCKER_CONFIG_DIR="$2"
shift
;;
--docker-config-dir)
DOCKER_CONFIG_DIR="$2"
shift
;;
--docker-zmk-dir)
DOCKER_ZMK_DIR="$2"
shift
;;
--docker-zmk-dir)
DOCKER_ZMK_DIR="$2"
shift
;;
*)
echo "Unknown option $1"
exit 1
;;
*)
echo "Unknown option $1"
exit 1
;;
esac
shift
@ -76,8 +76,7 @@ DOCKER_CMD="$SUDO docker run --name zmk-$ZEPHYR_VERSION --rm \
--mount type=volume,source=zmk-zephyr-tools-$ZEPHYR_VERSION,target=$DOCKER_ZMK_DIR/tools"
# Reset volumes
if [[ $CLEAR_CACHE = true ]]
then
if [[ $CLEAR_CACHE = true ]]; then
$SUDO docker volume rm $(sudo docker volume ls -q | grep "^zmk-.*-$ZEPHYR_VERSION$")
fi
@ -91,11 +90,9 @@ $DOCKER_CMD -w "$DOCKER_ZMK_DIR" "$DOCKER_IMG" /bin/bash -c " \
&& west update"
# Install docosaurus
if [[ $DOC_TOOLS = true ]]
then
if [[ $DOC_TOOLS = true ]]; then
$DOCKER_CMD -w "$DOCKER_ZMK_DIR/docs" "$DOCKER_IMG" npm ci
fi
# Start interactive shell
$DOCKER_CMD -w "$DOCKER_ZMK_DIR" -it "$DOCKER_IMG" /bin/bash