Some checks failed
Verify / Install node dependencies (push) Failing after 2s
Verify / Build packages (push) Has been skipped
Verify / Check linting & formatting (push) Has been skipped
Verify / Run unit tests (push) Has been skipped
Verify / Run e2e tests (shard 1/4) (push) Has been skipped
Verify / Run e2e tests (shard 2/4) (push) Has been skipped
Verify / Run e2e tests (shard 3/4) (push) Has been skipped
Verify / Run e2e tests (shard 4/4) (push) Has been skipped
Publish / Resolve publish config (push) Failing after 2s
Publish / Send notification to Slack (push) Has been skipped
Publish / Send failure notification to Slack (push) Failing after 8s
Verify / Merge e2e reports (push) Has been skipped
Publish / Build (push) Has been skipped
Publish / Bump Versions OR Release to Registry (push) Has been skipped
54 lines
1.2 KiB
Bash
Executable File
54 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)"
|
|
|
|
shopt -s nullglob
|
|
|
|
declare -a missing_paths=()
|
|
declare -a package_dirs=()
|
|
declare -a empty_paths=()
|
|
|
|
for package_json in "$REPO_ROOT"/packages/*/package.json; do
|
|
package_dirs+=("${package_json%/package.json}")
|
|
done
|
|
|
|
if [ "${#package_dirs[@]}" -eq 0 ]; then
|
|
echo "No package directories found."
|
|
exit 1
|
|
fi
|
|
|
|
for package_dir in "${package_dirs[@]}"; do
|
|
dist_dir="$package_dir/dist"
|
|
|
|
if [ ! -d "$dist_dir" ]; then
|
|
missing_paths+=("${dist_dir#"$REPO_ROOT"/}")
|
|
continue
|
|
fi
|
|
|
|
dist_entries=("$dist_dir"/*)
|
|
|
|
if [ "${#dist_entries[@]}" -eq 0 ]; then
|
|
empty_paths+=("${dist_dir#"$REPO_ROOT"/}")
|
|
fi
|
|
done
|
|
|
|
if [ "${#missing_paths[@]}" -eq 0 ] && [ "${#empty_paths[@]}" -eq 0 ]; then
|
|
echo "All ${#package_dirs[@]} package dist directories exist and contain build artifacts."
|
|
exit 0
|
|
fi
|
|
|
|
if [ "${#missing_paths[@]}" -gt 0 ]; then
|
|
echo "Missing dist directories:"
|
|
printf ' - %s\n' "${missing_paths[@]}"
|
|
fi
|
|
|
|
if [ "${#empty_paths[@]}" -gt 0 ]; then
|
|
echo "Empty dist directories:"
|
|
printf ' - %s\n' "${empty_paths[@]}"
|
|
fi
|
|
|
|
exit 1
|