dev 自动更新启动的python脚本,以及配合后端的配置项

This commit is contained in:
ZZY 2024-07-30 22:32:14 +08:00
parent 387c677222
commit b5a0624633
2 changed files with 11 additions and 4 deletions

View File

@ -12,9 +12,16 @@ def run_command(command):
def main():
# Define the commands you want to run
commands = [
'git clone https://github.com/yourusername/yourproject.git',
'cd yourproject && npm install',
'npm run build'
# 'git clone https://github.com/yourusername/yourproject.git',
'cd vue-project',
'git pull',
'npm install',
'npm run build',
'cd ..',
'git pull',
'npm install',
'cp -r vue-project/dist/* ./dist'
'npm start'
]
# Run each command in sequence

View File

@ -5,7 +5,7 @@ require('dotenv').config();
utils = {};
utils.ROOT_PATH = path.resolve(__dirname);
utils.VIEWS_PATH = path.resolve(utils.ROOT_PATH, 'views');
utils.DATA_PATH = path.resolve(utils.ROOT_PATH, '.data');
utils.DATA_PATH = path.resolve(utils.ROOT_PATH, 'dist/data');
utils.DATA_JSON_PATH = path.resolve(utils.DATA_PATH, 'json');
utils.DATA_DB_PATH = path.resolve(utils.DATA_PATH, 'db');
utils.DATA_CONFIG_PATH = path.resolve(utils.DATA_PATH, 'config');