Increase log verbosity when starting or updating the app.

This commit is contained in:
Chrystian Huot 2019-11-27 09:47:03 -05:00
parent ec9751a886
commit ed70e81687
2 changed files with 11 additions and 11 deletions

8
run.js
View file

@ -16,11 +16,11 @@ if (missingModules.client || missingModules.server) {
process.stdout.write('Installing node modules...');
if (missingModules.client) {
childProcess.execSync('npm install', { cwd: clientPath, stdio: 'ignore' });
childProcess.execSync('npm install', { cwd: clientPath, silent: true });
}
if (missingModules.server) {
childProcess.execSync('npm install', { cwd: serverPath, stdio: 'ignore' });
childProcess.execSync('npm install', { cwd: serverPath, silent: true });
}
process.stdout.write(' done\n');
@ -52,7 +52,7 @@ if (!fs.existsSync(envFile)) {
if (!fs.existsSync(path.resolve(clientPath, 'dist/main.html'))) {
process.stdout.write('Building client app...');
childProcess.execSync('npm run build', { cwd: clientPath, stdio: 'ignore' });
childProcess.execSync('npm run build', { cwd: clientPath, silent: true });
process.stdout.write(' done\n');
}
@ -63,7 +63,7 @@ if (process.env.DB_DIALECT === 'sqlite') {
if (!fs.existsSync(dbFile)) {
process.stdout.write(`Creating SQLITE database at ${dbFile}...`);
childProcess.execSync('npm run migrate', { cwd: serverPath, stdio: 'ignore' });
childProcess.execSync('npm run migrate', { cwd: serverPath, silent: true });
process.stdout.write(' done\n');
}
}

View file

@ -7,22 +7,22 @@ const clientPath = path.resolve(__dirname, 'client');
const serverPath = path.resolve(__dirname, 'server');
process.stdout.write('Pulling new version from github...');
childProcess.execSync('git pull', { stdio: 'ignore' });
childProcess.execSync('git pull', { silent: true });
process.stdout.write(' done\n');
process.stdout.write('Updating node modules...');
childProcess.execSync('npm install', { cwd: clientPath, stdio: 'ignore' });
childProcess.execSync('npm prune', { cwd: clientPath, stdio: 'ignore' });
childProcess.execSync('npm install', { cwd: serverPath, stdio: 'ignore' });
childProcess.execSync('npm prune', { cwd: serverPath, stdio: 'ignore' });
childProcess.execSync('npm install', { cwd: clientPath, silent: true });
childProcess.execSync('npm prune', { cwd: clientPath, silent: true });
childProcess.execSync('npm install', { cwd: serverPath, silent: true });
childProcess.execSync('npm prune', { cwd: serverPath, silent: true });
process.stdout.write(' done\n');
process.stdout.write('Migrating database...');
childProcess.execSync('npm run migrate', { cwd: serverPath, stdio: 'ignore' });
childProcess.execSync('npm run migrate', { cwd: serverPath, silent: true });
process.stdout.write(' done\n');
process.stdout.write('Building client app...');
childProcess.execSync('npm run build', { cwd: clientPath, stdio: 'ignore' });
childProcess.execSync('npm run build', { cwd: clientPath, silent: true });
process.stdout.write(' done\n');
process.stdout.write('Please restart Rdio Scanner\n')