Skip to content

Commit

Permalink
fix: update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
shaobeichen committed Nov 1, 2024
1 parent 7cb8c9c commit 61ceec5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const npmPath = path.join(__dirname, '../npm')

platforms.forEach((platform) => {
const [GOOS, GOARCH] = platform.goPlatform.split('/')
const [realOs, realArch] = platform.goPlatform.split('/')
const [realOs, realArch] = platform.realPlatform.split('/')

const childPackageName = `${realOs}-${realArch}`
const childPackageDir = path.join(npmPath, childPackageName)
Expand Down Expand Up @@ -54,14 +54,14 @@ platforms.forEach((platform) => {
},
(error, stdout, stderr) => {
if (error) {
console.error(`[error]: ${platform} ${error.message}`)
console.error(`[error]: ${platform.realPlatform} ${error.message}`)
return
}
if (stderr) {
console.error(`[stderr]: ${platform} ${stderr}`)
console.error(`[stderr]: ${platform.realPlatform} ${stderr}`)
return
}
console.log(`[success]: ${platform} ${stdout}`)
console.log(`[success]: ${platform.realPlatform} ${stdout}`)
},
)
})

0 comments on commit 61ceec5

Please sign in to comment.