ci: do not try to publish directories that are not packages (#41393)

We now include `misc/angular-in-memory-web-api` in the packages that
are build in the `dist/packages-dist` directory. But this package should
not be published as an artifact.

This commit prevents attempting to publishing the `misc` directory by
first checking whether the directory contains a `package.json` file.

PR Close #41393
This commit is contained in:
Pete Bacon Darwin 2021-03-31 18:47:19 +01:00 committed by Alex Rickabaugh
parent 7dfa446c4a
commit 18bc9ffb51
1 changed files with 6 additions and 0 deletions

View File

@ -92,6 +92,12 @@ function publishPackages {
for dir in $PKGS_DIST/*/
do
if [[ ! -f "$dir/package.json" ]]; then
# Only publish directories that contain a `package.json` file.
echo "Skipping $dir, it does not contain a package to be published."
continue
fi
COMPONENT="$(basename ${dir})"
# Replace _ with - in component name.