build(publish): replace version placeholders in .min.js files
This commit is contained in:
parent
043493cb62
commit
04d02b55d1
|
@ -31,15 +31,12 @@ 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" -print)
|
|
||||||
if [[ ${UMD} ]]; then
|
# Find umd.js and umd.min.js
|
||||||
for UMD_FILE in ${UMD}; do
|
UMD_FILES=$(find $REPO_DIR/ -type f -name "*.umd*.js" -print)
|
||||||
sed -i "s/\\\$\\\$ANGULAR_VERSION\\\$\\\$/${BUILD_VER}/g" ${UMD_FILE}
|
for UMD_FILE in ${UMD_FILES}; do
|
||||||
done
|
sed -i "s/\\\$\\\$ANGULAR_VERSION\\\$\\\$/${BUILD_VER}/g" ${UMD_FILE}
|
||||||
fi
|
done
|
||||||
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
|
fi
|
||||||
echo `date` > $REPO_DIR/BUILD_INFO
|
echo `date` > $REPO_DIR/BUILD_INFO
|
||||||
echo $SHA >> $REPO_DIR/BUILD_INFO
|
echo $SHA >> $REPO_DIR/BUILD_INFO
|
||||||
|
|
Loading…
Reference in New Issue