给 Node 页面添加了 本节点打包的区块列表模板。
给 各页面都读入了页头的数据,如IP地址,邻居数量。
This commit is contained in:
10
deploy.js
10
deploy.js
@@ -57,13 +57,13 @@ const necessaryPath = (path) => {
|
||||
}
|
||||
|
||||
ssh.connect(connection).then(async () => {
|
||||
console.log(`[ mv ${dist} ${dist}-backup-${new Date().toISOString()} ... ]`)
|
||||
console.log(`[ ${root} > mv ${dist} ${dist}-backup-${new Date().toISOString()} ... ]`)
|
||||
await ssh.execCommand(`mv ${dist} ${dist}-backup-${new Date().toISOString()}`, { cwd:root })
|
||||
console.log(`[ mkdir ${dist} ... ]`)
|
||||
console.log(`[ ${root} > mkdir ${dist} ... ]`)
|
||||
await ssh.execCommand(`mkdir ${dist}`, { cwd:root })
|
||||
const toCreate = necessaryPath('./dist')
|
||||
for (const name of toCreate) {
|
||||
console.log(`[ mkdir ${dist}/${name.join('/')} ... ]`)
|
||||
console.log(`[ ${root} > mkdir ${dist}/${name.join('/')} ... ]`)
|
||||
await ssh.execCommand(`mkdir ${dist}/${name.join('/')}`, { cwd:root })
|
||||
}
|
||||
|
||||
@@ -77,13 +77,13 @@ ssh.connect(connection).then(async () => {
|
||||
return !baseName.endsWith('.map');
|
||||
},
|
||||
tick: (localPath, remotePath, error) => {
|
||||
console.log(`Uploading "${localPath}" ===> "${remotePath}" ${error || 'succeeded!'}`)
|
||||
console.log(`"${localPath}" ===> "${remotePath}" ... ${error || 'succeeded!'}`)
|
||||
err = error
|
||||
},
|
||||
})
|
||||
ssh.dispose()
|
||||
if (err) {
|
||||
console.log('[ Uploaded with error! ]')
|
||||
console.log('[ Upload failed! ]')
|
||||
process.exit(1)
|
||||
} else {
|
||||
console.log('[ Uploaded successfully! ]')
|
||||
|
||||
Reference in New Issue
Block a user