Skip to content

Commit

Permalink
fix: 修复bundle脚本构建异常
Browse files Browse the repository at this point in the history
  • Loading branch information
mmdapl committed Oct 16, 2024
1 parent 798950b commit b17fd0c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/bundle
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,24 @@
* - ./scripts/bundle --proxy
*/

import {createRequire} from 'node:module'
import { createRequire } from 'node:module'
import process from 'node:process'
import {
VipDockerAddress,
OPEN_SOURCE_ADDRESS,
buildImage,
getRecentGitCommit,
} from '@142vip/utils'


(async () => {
try {
// 获取package.json文件
const pkg = createRequire(import.meta.url)('../package.json')

// 镜像地址
const imageName = `${VipDockerAddress}/docs:${pkg.name}-${pkg.version}`
const imageName = `${OPEN_SOURCE_ADDRESS.DOCKER_ALIYUNCS_VIP}/docs:${pkg.name}-${pkg.version}`

// 最近一次提交信息
const {hash: gitHash} = await getRecentGitCommit()
const { hash: gitHash } = await getRecentGitCommit()

// 构建镜像
await buildImage({
Expand All @@ -41,12 +40,13 @@ import {
['HOME_PAGE', pkg.authorInfo.homePage],
['GIT_HASH', gitHash],
],
memory:20000,
memory: 20000,
push: true,
delete: true,
logger: true,
})
} catch (e) {
}
catch (e) {
console.log('异常信息:', e)
}
})()

0 comments on commit b17fd0c

Please sign in to comment.