github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/hack/prettify-examples.sh (about) 1 #!/usr/bin/env bash 2 3 readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 4 LOCAL_ROOT_PATH=${SCRIPT_DIR}/../../.. 5 6 echo -e "${GREEN}Prettifying GraphQL examples...${NC}" 7 img="prettier:latest" 8 docker build -t ${img} ${LOCAL_ROOT_PATH}/tests/tools/prettier 9 docker run --rm -v "${LOCAL_ROOT_PATH}/components/director/examples":/prettier/examples \ 10 ${img} --write "examples/**/*.graphql" 11 12 cd "${LOCAL_ROOT_PATH}/tests/tools/example-index-generator/" || exit 13 EXAMPLES_DIRECTORY="${LOCAL_ROOT_PATH}/components/director/examples" go run main.go