From a2888e2f370f5e5c926ef82c6928e967e99a8b98 Mon Sep 17 00:00:00 2001 From: hole-thu Date: Mon, 7 Sep 2020 18:30:26 +0800 Subject: [PATCH] fix bugs --- public/policy.html | 2 +- src/UserAction.js | 2 +- travis_deploy.sh | 27 --------------------------- 3 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 travis_deploy.sh diff --git a/public/policy.html b/public/policy.html index 8d5d9b1..f34856e 100644 --- a/public/policy.html +++ b/public/policy.html @@ -39,7 +39,7 @@

四、 本规范所指"内容"包括 新T树洞用户在使用树洞的过程中上传、发布、传播的任何内容,包括但不限于文字、图片、网页链接等发送、回复的内容。用户发表任何内容时,即确认:
1. 该内容为用户所原创或享有相关版权,并为所发表的内容承担相关法律责任。
2. 用户向新T树洞团队永久许可其在新T树洞的发展、运营和维护期间储存用户发布的内容。
- 3. 用户已阅读并承诺遵守本规范及未来修订的所有版本中的所有内容。
+ 3. 用户已阅读并承诺遵守本规范中的所有内容。

五、 新T树洞账号仅供本人使用。使用新T树洞提供的任何网络服务即同意:
1. 用户不得以任何形式出借、出租、转让新T树洞账号。
diff --git a/src/UserAction.js b/src/UserAction.js index d93cb2b..419e2d5 100644 --- a/src/UserAction.js +++ b/src/UserAction.js @@ -666,7 +666,7 @@ export class PostForm extends Component {

请遵守 - + 树洞管理规范(试行) ,文明发言。 diff --git a/travis_deploy.sh b/travis_deploy.sh deleted file mode 100644 index 0f70732..0000000 --- a/travis_deploy.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - echo "skip deploy for pull request..." - exit 0 -fi - -if [ "$TRAVIS_BRANCH" = "master" ]; then - export DEPLOY_BRANCH="gh-pages-master" -else - export DEPLOY_BRANCH="gh-pages" -fi - -CDN_URL="https://cdn.jsdelivr.net/gh/thuhole/webhole@$DEPLOY_BRANCH" -VERSION_NUMBER="v$(grep -oP '"version": "\K[^"]+' package.json | head -n1).$TRAVIS_BUILD_NUMBER" - -echo "DEPLOY_BRANCH=$DEPLOY_BRANCH, VERSION_NUMBER=$VERSION_NUMBER, CDN_URL=$CDN_URL" -git config --global user.name "thuhole" -git config --global user.email "thuhole@users.noreply.github.com" -git remote rm origin -git remote add origin https://thuhole:"${GH_TOKEN}"@github.com/thuhole/webhole.git -CI=false PUBLIC_URL=$CDN_URL REACT_APP_BUILD_INFO=$VERSION_NUMBER npm run build -#额,这里用了个骚操作来修复Service Worker在Precache CDN内容的时候index.html返回content-type text/plain的问题 -sed -i 's|https://cdn.jsdelivr.net/gh/thuhole/webhole@'"$DEPLOY_BRANCH"'/index.html|./index.html|g' build/*-* -sed -i 's|https://cdn.jsdelivr.net/gh/thuhole/webhole@'"$DEPLOY_BRANCH"'/service-worker.js|./service-worker.js|g' build/*-* -sed -i 's|"https://cdn.jsdelivr.net/gh/thuhole/webhole@'"$DEPLOY_BRANCH"'","/service-worker.js"|".","/service-worker.js"|' build/static/js/*.js -sed -i 's|storage.googleapis.com/workbox-cdn/releases/4.3.1|cdn.jsdelivr.net/npm/workbox-cdn@4.3.1/workbox|g' build/service-worker.js -npm run deploy \ No newline at end of file