1
0
mirror of https://github.com/lensapp/lens.git synced 2024-10-26 09:47:18 +03:00
lens/scripts/lint-publish-configs.sh
Sebastian Malton 618a1c7004 chore: Fixup dependencies and ensure no duplication between kinds of dependencies
- Also un-bump xterm-fit-addon as it is only compatible with xterm@^5

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-16 16:42:33 -04:00

24 lines
633 B
Bash
Executable File

#!/bin/bash
set -e
PACKAGE_JSON_PATHS=$(find open-lens/* packages/* -type f -name package.json -not -path "*/node_modules/*")
exitCode=0
while IFS= read -r PACKAGE_JSON_PATH; do
PACKAGE_NAME=$(<"${PACKAGE_JSON_PATH}" jq .name)
PACKAGE_IS_PRIVATE=$(<"${PACKAGE_JSON_PATH}" jq .private)
if [[ "${PACKAGE_IS_PRIVATE}" == "true" ]]; then
continue
fi
PACKAGE_HAS_PUBLISH_CONFIG=$(<"${PACKAGE_JSON_PATH}" jq '.publishConfig != null')
if [[ "${PACKAGE_HAS_PUBLISH_CONFIG}" == "false" ]]; then
echo "${PACKAGE_NAME} is missing publish config"
exitCode=1
fi
done <<< "${PACKAGE_JSON_PATHS}"
exit "${exitCode}"