Commit c7368e22 authored by 王曜嵚 Wang Yaoqin's avatar 王曜嵚 Wang Yaoqin

dev: v1 打包时移动目录,而不是压缩目录

parent 1c4c577a
...@@ -31,15 +31,18 @@ export default defineEventHandler(async (event) => { ...@@ -31,15 +31,18 @@ export default defineEventHandler(async (event) => {
const version = /<logwire-starter\.version>(.*?)<\/logwire-starter\.version>/.exec(pomVersionStr)?.[1] const version = /<logwire-starter\.version>(.*?)<\/logwire-starter\.version>/.exec(pomVersionStr)?.[1]
const versionWeb = /<logwire-libs\.version>(.*?)<\/logwire-libs\.version>/.exec(pomVersionStr)?.[1] const versionWeb = /<logwire-libs\.version>(.*?)<\/logwire-libs\.version>/.exec(pomVersionStr)?.[1]
await docker.execContainerCommand({ container, cmd: 'tar -zvcf ../tenants.tar.gz ./projects/demo', dir: '/var/logwire-platform/dist'}) try {
await docker.execContainerCommand({ container, cmd: 'mv -bf ./projects ../tenants_config', dir: '/var/logwire-platform/dist'})
} catch (err) {}
await docker.execContainerCommand({ container, cmd: 'rm -rf dist', dir: '/var/logwire-platform'}) await docker.execContainerCommand({ container, cmd: 'rm -rf dist', dir: '/var/logwire-platform'})
await docker.execContainerCommand({ container, cmd: 'mkdir -p dist/lib', dir: '/var/logwire-platform'}) await docker.execContainerCommand({ container, cmd: 'mkdir -p dist/lib', dir: '/var/logwire-platform'})
await docker.execContainerCommand({ container, cmd: 'mkdir -p dist/config', dir: '/var/logwire-platform'}) await docker.execContainerCommand({ container, cmd: 'mkdir -p dist/config', dir: '/var/logwire-platform'})
await docker.execContainerCommand({ container, cmd: 'mkdir -p dist/products', dir: '/var/logwire-platform'}) await docker.execContainerCommand({ container, cmd: 'mkdir -p dist/products', dir: '/var/logwire-platform'})
await docker.execContainerCommand({ container, cmd: `cp logwire-build/logwire-server/logwire-starter/target/logwire-starter-${version}.jar dist/`, dir: '/var/logwire-platform'}) await docker.execContainerCommand({ container, cmd: `cp logwire-build/logwire-server/logwire-starter/target/logwire-starter-${version}.jar dist/`, dir: '/var/logwire-platform'})
await docker.execContainerCommand({ container, cmd: `cp logwire-build/logwire-server/logwire-libs/logwire-web/target/logwire-web-${versionWeb}.jar dist/lib/`, dir: '/var/logwire-platform'}) await docker.execContainerCommand({ container, cmd: `cp logwire-build/logwire-server/logwire-libs/logwire-web/target/logwire-web-${versionWeb}.jar dist/lib/`, dir: '/var/logwire-platform'})
await docker.execContainerCommand({ container, cmd: 'tar -zxvf ../tenants.tar.gz', dir: '/var/logwire-platform/dist'}) try {
await docker.execContainerCommand({ container, cmd: 'rm ../tenants.tar.gz', dir: '/var/logwire-platform/dist'}) await docker.execContainerCommand({ container, cmd: 'mv -f ../tenants_config ./projects', dir: '/var/logwire-platform/dist'})
} catch (err) {}
await copyAndCreateServerPropertiesV1InDocker(username) await copyAndCreateServerPropertiesV1InDocker(username)
LogUtil.printInfo(username, '编译完成') LogUtil.printInfo(username, '编译完成')
await changeProjectStatus( 'v1', username, 'status', 'compiled') await changeProjectStatus( 'v1', username, 'status', 'compiled')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment