Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2f80891

Browse files
committed
Fix a bug in the deployment script (tools/publish.js)
1 parent 78cd7af commit 2f80891

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tools/publish.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ cp.spawnSync('docker-compose', ['run', '--rm', 'api', '/bin/sh', '-c', 'yarn ins
2323
cp.spawnSync('docker', ['build', '--no-cache', '--tag', pkg.name, '.'], { stdio: 'inherit' });
2424
const ssh = cp.spawn('ssh', ['-C', host, 'docker', 'load'], { stdio: ['pipe', 'inherit', 'inherit'] });
2525
const docker = cp.spawn('docker', ['save', pkg.name], { stdio: ['inherit', ssh.stdin, 'inherit'] });
26-
docker.on('exit', () => {
27-
ssh.stdin.end(() => {
28-
cp.spawnSync('ssh', ['-C', host, 'docker-compose', '-f', composeFile, 'up', '-d'], { stdio: 'inherit' });
29-
cp.spawnSync('ssh', ['-C', host, 'docker', 'image', 'prune', '-a', '-f'], { stdio: 'inherit' });
30-
});
26+
docker.on('exit', () => { ssh.stdin.end(); });
27+
ssh.on('exit', () => {
28+
cp.spawnSync('ssh', ['-C', host, 'docker-compose', '-f', composeFile, 'up', '-d'], { stdio: 'inherit' });
29+
cp.spawnSync('ssh', ['-C', host, 'docker', 'image', 'prune', '-a', '-f'], { stdio: 'inherit' });
3130
});

0 commit comments

Comments
 (0)