dev 自动更新启动的python脚本,以及配合后端的配置项
This commit is contained in:
parent
387c677222
commit
b5a0624633
13
start.py
13
start.py
@ -12,9 +12,16 @@ def run_command(command):
|
|||||||
def main():
|
def main():
|
||||||
# Define the commands you want to run
|
# Define the commands you want to run
|
||||||
commands = [
|
commands = [
|
||||||
'git clone https://github.com/yourusername/yourproject.git',
|
# 'git clone https://github.com/yourusername/yourproject.git',
|
||||||
'cd yourproject && npm install',
|
'cd vue-project',
|
||||||
'npm run build'
|
'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
|
# Run each command in sequence
|
||||||
|
2
utils.js
2
utils.js
@ -5,7 +5,7 @@ require('dotenv').config();
|
|||||||
utils = {};
|
utils = {};
|
||||||
utils.ROOT_PATH = path.resolve(__dirname);
|
utils.ROOT_PATH = path.resolve(__dirname);
|
||||||
utils.VIEWS_PATH = path.resolve(utils.ROOT_PATH, 'views');
|
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_JSON_PATH = path.resolve(utils.DATA_PATH, 'json');
|
||||||
utils.DATA_DB_PATH = path.resolve(utils.DATA_PATH, 'db');
|
utils.DATA_DB_PATH = path.resolve(utils.DATA_PATH, 'db');
|
||||||
utils.DATA_CONFIG_PATH = path.resolve(utils.DATA_PATH, 'config');
|
utils.DATA_CONFIG_PATH = path.resolve(utils.DATA_PATH, 'config');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user