import { options, sourceInfo, run, fail } from './release.mjs' try { const args = options({ tag: { type: 'string' }, 'source-ref': { type: 'string' } }) if (args.help) console.log('pnpm build:docker [--tag VERSION] [--source-ref FRONTEND_COMMIT]') else { const info = sourceInfo(args) run('docker', ['build', '-f', 'deploy/Dockerfile', '--build-arg', `VERSION=${info.version}`, '--build-arg', `SOURCE_REVISION=${info.revision}`, '--build-arg', `SOURCE_TREE=${info.tree}`, '-t', `sw2/frontend:${info.version}`, '.']) console.log(`镜像:sw2/frontend:${info.version}`) } } catch (error) { fail(error) }