From bac1a6eab3b3b45f2957f7c07fa6b454ead04c62 Mon Sep 17 00:00:00 2001 From: Vikram Subramanian Date: Thu, 12 May 2016 16:49:03 -0700 Subject: [PATCH] fix(build): Fix an error in package publishing step where the script errors when a UMD bundle is not found for compiler-cli package. --- scripts/publish/publish-build-artifacts.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/publish/publish-build-artifacts.sh b/scripts/publish/publish-build-artifacts.sh index c27ca17c59..8962732cd2 100755 --- a/scripts/publish/publish-build-artifacts.sh +++ b/scripts/publish/publish-build-artifacts.sh @@ -32,7 +32,10 @@ function publishRepo { BUILD_VER="2.0.0-${SHORT_SHA}" if [[ ${TRAVIS} ]]; then find $REPO_DIR/ -type f -name package.json -print0 | xargs -0 sed -i "s/\\\$\\\$ANGULAR_VERSION\\\$\\\$/${BUILD_VER}/g" - find $REPO_DIR/ -type f -name "*umd.js" -print0 | xargs -0 sed -i "s/\\\$\\\$ANGULAR_VERSION\\\$\\\$/${BUILD_VER}/g" + UMD=$(find $REPO_DIR/ -type f -name "*umd.js" -print0) + if [[ ${UMD} ]]; then + sed -i "s/\\\$\\\$ANGULAR_VERSION\\\$\\\$/${BUILD_VER}/g" ${UMD} + fi else find $REPO_DIR/ -type f -name package.json -print0 | xargs -0 sed -i '' "s/\\\$\\\$ANGULAR_VERSION\\\$\\\$/${BUILD_VER}/g" find $REPO_DIR/ -type f -name "*umd.js" -print0 | xargs -0 sed -i '' "s/\\\$\\\$ANGULAR_VERSION\\\$\\\$/${BUILD_VER}/g"