mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
fix version release for Dockerfile build (#1080)
This commit is contained in:
parent
40fbb61a1b
commit
cc7459e403
4 changed files with 19 additions and 4 deletions
|
|
@ -109,8 +109,14 @@ function buildImage(imageName, dockerfile) {
|
|||
? `${sandboxCommand} build --authfile=<(echo '{}')`
|
||||
: `${sandboxCommand} --config=".docker" buildx build`;
|
||||
|
||||
const npmPackageVersion = JSON.parse(
|
||||
readFileSync(join(process.cwd(), 'package.json'), 'utf-8'),
|
||||
).version;
|
||||
|
||||
execSync(
|
||||
`${buildCommand} ${process.env.BUILD_SANDBOX_FLAGS || ''} -f "${dockerfile}" -t "${imageName}" .`,
|
||||
`${buildCommand} ${
|
||||
process.env.BUILD_SANDBOX_FLAGS || ''
|
||||
} --build-arg CLI_VERSION_ARG=${npmPackageVersion} -f "${dockerfile}" -t "${imageName}" .`,
|
||||
{ stdio: buildStdout, shell: '/bin/bash' },
|
||||
);
|
||||
console.log(`built ${imageName}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue