Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Commit bce4bd1

Browse files
committed
build: update script output
1 parent 1ec26a4 commit bce4bd1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

scripts/lib/builder.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
const path = require('path')
12
const fs = require('fs-extra')
23
const { execSync } = require('child_process')
34
const BuildOptions = require('./options')
5+
const logger = require('./logger')
46

57
const tools = [
68
require('./xmake'),
@@ -27,14 +29,17 @@ class Builder {
2729
}
2830

2931
run() {
32+
logger.log('\n[run]')
3033
return this.tool.run(this.options)
3134
}
3235

3336
configure() {
37+
logger.log('\n[configure]')
3438
return this.tool.configure(this.options)
3539
}
3640

3741
build() {
42+
logger.log('\n[build]')
3843
this.beforeBuild()
3944
const result = this.tool.build(this.options)
4045
this.afterBuild()
@@ -53,9 +58,13 @@ class Builder {
5358
if (!fs.existsSync(opts.binDir)) {
5459
return
5560
}
61+
logger.log('\n[after build]')
62+
logger.log(`copy ${opts.binDir} -> ${opts.targetDir}`)
5663
fs.copySync(opts.binDir, opts.targetDir)
57-
if (this.platform == 'windows') {
58-
fs.copySync(path.join(opts.targetDir, this.mode, opts.targetFileName), opts.targetPath)
64+
if (this.options.platform == 'windows') {
65+
const targetPath = path.join(opts.targetDir, opts.mode, opts.targetFileName)
66+
logger.log(`copy ${targetPath} -> ${opts.targetPath}`)
67+
fs.copySync(targetPath, opts.targetPath)
5968
}
6069
}
6170
}

0 commit comments

Comments
 (0)