remote 命令
This commit is contained in:
parent
7eccf1bf15
commit
658a7031b6
@ -32,7 +32,7 @@ module.exports = class SystemConfig {
|
|||||||
if ( this.isWindows() ) {
|
if ( this.isWindows() ) {
|
||||||
path = require('path').dirname(require.main.filename)
|
path = require('path').dirname(require.main.filename)
|
||||||
} else {
|
} else {
|
||||||
path = process.execPath;
|
path = require('path').dirname(process.execPath);
|
||||||
}
|
}
|
||||||
this.affirmDir(path)
|
this.affirmDir(path)
|
||||||
$logger.debug(`LocalKitPath=${path}`)
|
$logger.debug(`LocalKitPath=${path}`)
|
||||||
|
@ -172,6 +172,7 @@ module.exports = class Remote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async wUpload(from, to, debug){
|
async wUpload(from, to, debug){
|
||||||
|
$logger.info(`from=${from} to=${to}`)
|
||||||
const totalSize = fs.statSync(from).size;
|
const totalSize = fs.statSync(from).size;
|
||||||
debug ? console.log("totalSize", totalSize) : null
|
debug ? console.log("totalSize", totalSize) : null
|
||||||
const rs = fs.createReadStream( from );
|
const rs = fs.createReadStream( from );
|
||||||
|
@ -27,7 +27,7 @@ module.exports = async function publish(remote, localFile, remotePath) {
|
|||||||
let filename = path.basename(localFile);
|
let filename = path.basename(localFile);
|
||||||
|
|
||||||
// 上传文件
|
// 上传文件
|
||||||
await remote.wUpload( localFile , path.posix.resolve(folder , filename ), true);
|
await remote.wUpload( localFile , path.posix.resolve(folder , filename ));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user