ci(publish): fix multiples umd files (#11179)

This commit is contained in:
Victor Berchet
2016-08-30 19:58:07 -07:00
committed by GitHub
parent 979657989b
commit 24e046fd6a

View File

@ -31,9 +31,11 @@ function publishRepo {
BUILD_VER="2.0.0-${SHORT_SHA}" BUILD_VER="2.0.0-${SHORT_SHA}"
if [[ ${TRAVIS} ]]; then 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 package.json -print0 | xargs -0 sed -i "s/\\\$\\\$ANGULAR_VERSION\\\$\\\$/${BUILD_VER}/g"
UMD=$(find $REPO_DIR/ -type f -name "*umd.js" -print0) UMD=$(find $REPO_DIR/ -type f -name "*umd.js" -print)
if [[ ${UMD} ]]; then if [[ ${UMD} ]]; then
sed -i "s/\\\$\\\$ANGULAR_VERSION\\\$\\\$/${BUILD_VER}/g" ${UMD} for UMD_FILE in ${UMD}; do
sed -i "s/\\\$\\\$ANGULAR_VERSION\\\$\\\$/${BUILD_VER}/g" ${UMD_FILE}
done
fi fi
else 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 package.json -print0 | xargs -0 sed -i '' "s/\\\$\\\$ANGULAR_VERSION\\\$\\\$/${BUILD_VER}/g"