OSDN Git Service

feat: set regex to global mode
authorIr1d <sirius.caffrey@gmail.com>
Wed, 28 Aug 2019 17:18:04 +0000 (01:18 +0800)
committerIr1d <sirius.caffrey@gmail.com>
Wed, 28 Aug 2019 17:18:04 +0000 (01:18 +0800)
.travis.yml
scripts/netlify_build.sh

index 11ab987..7a15885 100644 (file)
@@ -39,7 +39,7 @@ after_deploy:
   - git checkout -b gh-pages origin/gh-pages
   - git push coding gh-pages:coding-pages -f
   - git checkout -b cdn-pages origin/gh-pages
-  - find ./ -type f -name "*.html" -exec sed -i -E 's/([^"]*)(assets[^"]*)/https:\/\/cdn-for-oi-wiki.billchn.com\/\2/' {} +
+  - find ./ -type f -name "*.html" -exec sed -i -E 's/([^"]*)(assets[^"]*)/https:\/\/cdn-for-oi-wiki.billchn.com\/\2/g' {} +
   - git add .
   - git commit --author "24OI-bot <15963390+24OI-bot@users.noreply.github.com>" -m "build cdn files"
   - git push origin cdn-pages
index b8de25d..e778fb1 100755 (executable)
@@ -22,7 +22,7 @@ mkdocs build -v
 
 find ./site -type f -name '*.html' -exec node --max_old_space_size=512 ./scripts/render_math.js {} \;
 
-find ./site -type f -name "*.html" -exec sed -i -E 's/([^"]*)(assets[^"]*)/https:\/\/cdn-for-oi-wiki.billchn.com\/\2/' {} +
+find ./site -type f -name "*.html" -exec sed -i -E 's/([^"]*)(assets[^"]*)/https:\/\/cdn-for-oi-wiki.billchn.com\/\2/g' {} +
 
 # npx gulp minify
 # try to avoid netlify timeout