From 18bc9ffb51e0ec9274e5fe0a675c7cfd13c57d07 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Wed, 31 Mar 2021 18:47:19 +0100 Subject: [PATCH] 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 --- scripts/ci/publish-build-artifacts.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/ci/publish-build-artifacts.sh b/scripts/ci/publish-build-artifacts.sh index 9ed2f778db..70a51bf802 100755 --- a/scripts/ci/publish-build-artifacts.sh +++ b/scripts/ci/publish-build-artifacts.sh @@ -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.