From 267d8649766ec7a85a1b2366d7394afc87db7df0 Mon Sep 17 00:00:00 2001 From: Vikram Subramanian Date: Thu, 12 May 2016 13:58:42 -0700 Subject: [PATCH] fix(build): Fix broken e2e test Travis task by running the right variation of sed on Travis --- scripts/publish/publish-build-artifacts.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/publish/publish-build-artifacts.sh b/scripts/publish/publish-build-artifacts.sh index 1b66f5c803..c27ca17c59 100755 --- a/scripts/publish/publish-build-artifacts.sh +++ b/scripts/publish/publish-build-artifacts.sh @@ -30,8 +30,13 @@ function publishRepo { # Replace $$ANGULAR_VESION$$ with the build version. BUILD_VER="2.0.0-${SHORT_SHA}" - 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" + 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" + 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" + fi echo `date` > $REPO_DIR/BUILD_INFO echo $SHA >> $REPO_DIR/BUILD_INFO