postcat/scripts/deployWindows.js

46 lines
1.2 KiB
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 打包发布完成!')) {
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
conn.end();
process.exit();
}
})
.end(
[
'set TERM=msys',
2023-02-15 14:02:54 +08:00
`set GITHUB_TOKEN=${process.env.GITHUB_TOKEN}`,
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
'd:',
`cd \\git\\postcat`,
2023-02-15 14:02:54 +08:00
'git reset --hard',
...Array.from({ length: 5 }).map(_ => 'git pull'),
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
'nvm use 16.13.2',
2023-02-15 14:02:54 +08:00
`echo ${process.env.QINIU_ENV_JS} > qiniu_env.js`,
'yarn install',
'yarn release',
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
'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
});