Skip to content

Commit

Permalink
move serverless/loadconfig.py to updateconfig.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chen310 committed Mar 11, 2022
1 parent 6fd353f commit 83c1201
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ git pull
然后更新配置文件

```shell
python3 ./serverless/loadconfig.py config.example.json config.json config.json
python3 ./updateconfig.py config.example.json config.json config.json
```

## 四、使用`docker`部署
Expand Down
2 changes: 1 addition & 1 deletion ql_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
print('复制配置示例文件...')
os.system('cp -f {} {}'.format(repo_config, example_config))
print('更新配置文件...')
os.system('python3 {}scripts/chen310_NeteaseCloudMusicTasks/serverless/loadconfig.py {} {} {}'.format(
os.system('python3 {}scripts/chen310_NeteaseCloudMusicTasks/updateconfig.py {} {} {}'.format(
data_path, repo_config, scripts_config, scripts_config))
print('更新完成')
else:
Expand Down
2 changes: 1 addition & 1 deletion serverless/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ else
# 备份配置文件
mv ./code/config.json $old_config_file
# 将旧配置文件中的数据转移到新配置文件中
python ./serverless/loadconfig.py $example_config_file $old_config_file $config_file
python ./updateconfig.py $example_config_file $old_config_file $config_file
if [ $? -ne 0 ]; then
echo "配置文件复制错误,请检查 config.json 文件是否填写正确"
echo -e "\033[1;31m部署失败 \033[0m"
Expand Down
3 changes: 0 additions & 3 deletions serverless/loadconfig.py → updateconfig.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import json5
import sys
import os
import copy
sys.path.append(os.path.abspath(os.path.dirname(os.path.dirname(__file__))))
from utils import jsonDumps
from utils import updateConfig

Expand Down

0 comments on commit 83c1201

Please sign in to comment.