postcat/scripts/deployWindows.js

41 lines
996 B
JavaScript
Raw Normal View History

feat/optimization extension (#226) * chore: update patcheds * chore: electron-build remove after pack hook * chore: update electron build config * chore: update electron build config * chore: update npm scripts * chore: update .gitattributes * chore: update .gitattributes * chore: update .gitattributes * chore: update npm scripts * chore: update electron builder config * chore: update electron builder * chore: update config * chore: add build script * chore: remove electron-build.json * chore: update build script * chore: update build script * chore: update build script * chore: update npm script * chore: update npm script * chore: update scripts * chore: update npm script * chore: update npm script * chore: update npm script * chore: update npm script * chore: update npm script * chore: update npm script * chore: add build script * chore: add build script * chore: add build script * chore: add build script * chore: add build script * chore: test relese * chore: test relese * chore: test relese * chore: update config * chore: update npm script * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * chore: update config * Delete client.ovpn * chore: remove electron-builder.json * chore: merge code * chore: merge code * refactor: optimization extension ui * feat: search extension * fix: merge data struct * chore: update build * refactor: style * wip: extenson-list * chore: merge code * fix: author * style: update tag bgcolor * fix: some css style issue * fix: extension list update * fix: suggest * fix: extension tree select * fix: settings index * feat: params-import auto paste --------- Co-authored-by: buqiyuan <1743369777@qq.com>
2023-02-09 14:11:43 +08:00
const { Client } = require('ssh2');
const conn = new Client();
conn
.on('ready', () => {
console.log('Client :: ready');
conn.shell((err, stream) => {
if (err) throw err;
stream
.on('close', () => {
console.log('stream CLOSED');
conn.end();
process.exit();
})
.on('data', data => {
console.log(data.toString());
if (data.toString().includes('Windows打包发布完成!')) {
conn.end();
process.exit();
}
})
.end(
[
'set TERM=msys',
'd:',
`cd \\git\\postcat`,
'nvm use 16.13.2',
'yarn build:static',
'nvm use 12.22.10',
'echo Windows打包发布完成!'
].join('\r\n')
);
});
})
.connect({
host: process.env.SSH_WINDOWS_IP,
username: process.env.SSH_WINDOWS_USERNAME,
password: process.env.SSH_WINDOWS_PASSWORD
});