From c6be42b8b3b0ec360bad6f5bcae78d25ee3dc683 Mon Sep 17 00:00:00 2001 From: shangfengh <3495281661@qq.com> Date: Fri, 21 Apr 2023 01:28:03 +0800 Subject: [PATCH] fix: :bug: fix CI --- .github/workflows/upload_COS.yml | 3 +++ dependency/py/HashFiles.py | 7 ------- dependency/shell/Unix2doc.sh | 17 +++++++++++++++++ docs/GameRules.md | 2 ++ 4 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 dependency/shell/Unix2doc.sh diff --git a/.github/workflows/upload_COS.yml b/.github/workflows/upload_COS.yml index 2b5a737..33282dd 100644 --- a/.github/workflows/upload_COS.yml +++ b/.github/workflows/upload_COS.yml @@ -53,6 +53,9 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Unix to docs + run: sh ./dependency/shell/Unix2dox.sh + - name: Hash THUAI6 run: | python ./dependency/py/HashFiles.py -t ../THUAI6 diff --git a/dependency/py/HashFiles.py b/dependency/py/HashFiles.py index b5f27c9..07c2fdc 100644 --- a/dependency/py/HashFiles.py +++ b/dependency/py/HashFiles.py @@ -14,13 +14,6 @@ def generateHashFile(): for root, dirs, files in os.walk(file): for file in files: path = os.path.join(root, file) - if mimetypes.guess_type(file)[0] == 'text/plain': - with open(path, 'r', errors='ignore') as f: - data = f.read() - if data.find('\r\n') == -1 : - data.replace('\n','\r\n') - with open(path, 'w') as f: - f.write(data) with open(path, 'rb') as f: data = f.read() hashlist[path.replace('\\','/')]=hashlib.md5(data).hexdigest() diff --git a/dependency/shell/Unix2doc.sh b/dependency/shell/Unix2doc.sh new file mode 100644 index 0000000..451b20e --- /dev/null +++ b/dependency/shell/Unix2doc.sh @@ -0,0 +1,17 @@ +#! /bin/bash +function lsdir() +{ +for i in `ls`; +do + if [ -d $i ] + then + pushd ./$i + lsdir + popd + else + unix2dos $i + fi +done +} +cd ../../ +lsdir diff --git a/docs/GameRules.md b/docs/GameRules.md index c7303bc..3b194c0 100644 --- a/docs/GameRules.md +++ b/docs/GameRules.md @@ -108,6 +108,8 @@ $$ - 除了翻窗,交互目标与交互者在一个**九宫格**方可交互 - 交互进度每毫秒增加对应交互速度的值 - 作业,门,箱子完成/开启进度达到10000000为完成 +- 校门开启进度达到18000为完成 + #### 学习与毕业 - 共有10间教室,学生需要完成**7间**教室的作业,才可以开启校门。