feat(bin): 优化打包脚本到跨平台
This commit is contained in:
102
bin/.gitignore
vendored
Normal file
102
bin/.gitignore
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.code-snippets
|
||||
.history/
|
||||
*.vsix
|
||||
*~
|
||||
.fuse_hidden*
|
||||
.directory
|
||||
.Trash-*
|
||||
.nfs*
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
.pnpm-debug.log*
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
lib-cov
|
||||
coverage
|
||||
*.lcov
|
||||
.nyc_output
|
||||
.grunt
|
||||
bower_components
|
||||
.lock-wscript
|
||||
build/Release
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
web_modules/
|
||||
*.tsbuildinfo
|
||||
.npm
|
||||
.eslintcache
|
||||
.stylelintcache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
.node_repl_history
|
||||
*.tgz
|
||||
.yarn-integrity
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
.cache
|
||||
.parcel-cache
|
||||
.next
|
||||
out
|
||||
.nuxt
|
||||
dist
|
||||
.cache/
|
||||
.vuepress/dist
|
||||
.temp
|
||||
.docusaurus
|
||||
.serverless/
|
||||
.fusebox/
|
||||
.dynamodb/
|
||||
.tern-port
|
||||
.vscode-test
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
*.stackdump
|
||||
[Dd]esktop.ini
|
||||
$RECYCLE.BIN/
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
*.lnk
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
Icon
|
||||
._*
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
54
bin/build-all.js
Normal file
54
bin/build-all.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_package_batch, run_upload} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch([
|
||||
'service-common',
|
||||
'service-dependencies',
|
||||
'service-configuration',
|
||||
'service-forest',
|
||||
'service-cli',
|
||||
'service-cli/service-cli-core',
|
||||
'service-executor',
|
||||
'service-executor/service-executor-core',
|
||||
'utils/executor',
|
||||
])
|
||||
await run_package_batch([
|
||||
'service-api',
|
||||
'service-check',
|
||||
'service-cli/service-cli-runner',
|
||||
'service-cloud-query',
|
||||
'service-executor/service-executor-manager',
|
||||
'service-executor/service-executor-task',
|
||||
'service-command',
|
||||
'service-command-pro',
|
||||
'service-exporter',
|
||||
'service-flink-query',
|
||||
'service-gateway',
|
||||
'service-hudi-query',
|
||||
'service-info-query',
|
||||
'service-monitor',
|
||||
'service-loki-query',
|
||||
'service-pulsar-query',
|
||||
'service-queue',
|
||||
'service-scheduler',
|
||||
'service-uploader',
|
||||
'service-web',
|
||||
'service-yarn-query',
|
||||
'service-zookeeper-query',
|
||||
'utils/patch',
|
||||
'utils/sync',
|
||||
])
|
||||
for (const profile of ['b2a4', 'b2b1', 'b2b12']) {
|
||||
await run_package('service-launcher', profile)
|
||||
await run_upload(`**/service-launcher-${profile}-1.0.0-SNAPSHOT.jar`)
|
||||
}
|
||||
await run_upload('**/target/*-1.0.0-SNAPSHOT.jar')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
mvn install -N -D skipTests
|
||||
deploy service-common service-dependencies service-configuration service-forest service-cli service-cli/service-cli-core service-executor service-executor/service-executor-core utils/executor
|
||||
package service-api service-check service-cli/service-cli-runner service-cloud-query service-executor/service-executor-manager service-executor/service-executor-task service-command service-command-pro service-exporter service-flink-query service-gateway service-hudi-query service-info-query service-monitor service-loki-query service-pulsar-query service-queue service-scheduler service-uploader service-web service-yarn-query service-zookeeper-query utils/patch utils/sync
|
||||
|
||||
configs=(b2a4 b2b1 b2b12)
|
||||
for config in ${configs[*]};
|
||||
do
|
||||
mvn -pl service-launcher clean package -D skipTests -P $config
|
||||
upload $root_path/service-launcher/target/service-launcher-$config-1.0.0-SNAPSHOT.jar
|
||||
done
|
||||
|
||||
upload $root_path/service-api/target/service-api-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-check/target/service-check-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-cloud-query/target/service-cloud-query-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-command/target/service-command-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-command-pro/target/service-command-pro-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-executor/service-executor-manager/target/service-executor-manager-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-executor/service-executor-task/target/service-executor-task-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-exporter/target/service-exporter-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-flink-query/target/service-flink-query-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-gateway/target/service-gateway-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-hudi-query/target/service-hudi-query-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-info-query/target/service-info-query-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-loki-query/target/service-loki-query-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-monitor/target/service-monitor-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-pulsar-query/target/service-pulsar-query-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-queue/target/service-queue-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-scheduler/target/service-scheduler-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-web/target/service-web-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-yarn-query/target/service-yarn-query-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-zookeeper-query/target/service-zookeeper-query-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/utils/sync/target/sync-1.0.0-SNAPSHOT.jar
|
||||
|
||||
upload $root_path/service-cli/service-cli-runner/target/service-cli-runner-1.0.0-SNAPSHOT.jar
|
||||
upload $root_path/service-uploader/target/service-uploader-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-api.js
Normal file
15
bin/build-api.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-api')
|
||||
await run_upload_normal('service-api')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-api
|
||||
upload $root_path/service-api/target/service-api-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-check.js
Normal file
15
bin/build-check.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-check')
|
||||
await run_upload_normal('service-check')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-check
|
||||
upload $root_path/service-check/target/service-check-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-cli.js
Normal file
15
bin/build-cli.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-cli', 'service-cli/service-cli-core'])
|
||||
await run_package('service-cli/service-cli-runner')
|
||||
await run_upload_normal('service-cli-runner', 'service-cli')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-cli service-cli/service-cli-core
|
||||
package service-cli/service-cli-runner
|
||||
upload $root_path/service-cli/service-cli-runner/target/service-cli-runner-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-cloud-query.js
Normal file
15
bin/build-cloud-query.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-cloud-query')
|
||||
await run_upload_normal('service-cloud-query')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-cloud-query
|
||||
upload $root_path/service-cloud-query/target/service-cloud-query-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-command-pro.js
Normal file
15
bin/build-command-pro.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-command-pro')
|
||||
await run_upload_normal('service-command-pro')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-command-pro
|
||||
upload $root_path/service-command-pro/target/service-command-pro-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-command.js
Normal file
15
bin/build-command.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-command')
|
||||
await run_upload_normal('service-command')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-command
|
||||
upload $root_path/service-command/target/service-command-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-executor-manager.js
Normal file
15
bin/build-executor-manager.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest', 'service-executor', 'service-executor/service-executor-core'])
|
||||
await run_package('service-executor/service-executor-manager')
|
||||
await run_upload_normal('service-executor-manager', 'service-executor')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest service-executor service-executor/service-executor-core
|
||||
package service-executor/service-executor-manager
|
||||
upload $root_path/service-executor/service-executor-manager/target/service-executor-manager-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-executor-task.js
Normal file
15
bin/build-executor-task.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest', 'service-executor', 'service-executor/service-executor-core'])
|
||||
await run_package('service-executor/service-executor-task')
|
||||
await run_upload_normal('service-executor-task', 'service-executor')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest service-executor service-executor/service-executor-core
|
||||
package service-executor/service-executor-task
|
||||
upload $root_path/service-executor/service-executor-task/target/service-executor-task-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-exporter.js
Normal file
15
bin/build-exporter.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-exporter')
|
||||
await run_upload_normal('service-exporter')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-exporter
|
||||
upload $root_path/service-exporter/target/service-exporter-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-flink-query.js
Normal file
15
bin/build-flink-query.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-flink-query')
|
||||
await run_upload_normal('service-flink-query')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-flink-query
|
||||
upload $root_path/service-flink-query/target/service-flink-query-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-gateway.js
Normal file
15
bin/build-gateway.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-gateway')
|
||||
await run_upload_normal('service-gateway')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-gateway
|
||||
upload $root_path/service-gateway/target/service-gateway-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-hudi-query.js
Normal file
15
bin/build-hudi-query.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-hudi-query')
|
||||
await run_upload_normal('service-hudi-query')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-hudi-query
|
||||
upload $root_path/service-hudi-query/target/service-hudi-query-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-info-query.js
Normal file
15
bin/build-info-query.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-info-query')
|
||||
await run_upload_normal('service-info-query')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-info-query
|
||||
upload $root_path/service-info-query/target/service-info-query-1.0.0-SNAPSHOT.jar
|
||||
17
bin/build-launcher.js
Normal file
17
bin/build-launcher.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
for (const profile of ['b2a4', 'b2b1', 'b2b12']) {
|
||||
await run_package('service-launcher', profile)
|
||||
await run_upload(`**/service-launcher-${profile}-1.0.0-SNAPSHOT.jar`)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
|
||||
configs=(b2a4 b2b1 b2b12)
|
||||
for config in ${configs[*]};
|
||||
do
|
||||
mvn -pl service-launcher clean package -D skipTests -P $config -s $maven_setting
|
||||
upload $root_path/service-launcher/target/service-launcher-$config-1.0.0-SNAPSHOT.jar
|
||||
done
|
||||
15
bin/build-loki-query.js
Normal file
15
bin/build-loki-query.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-loki-query')
|
||||
await run_upload_normal('service-loki-query')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-loki-query
|
||||
upload $root_path/service-loki-query/target/service-loki-query-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-monitor.js
Normal file
15
bin/build-monitor.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-monitor')
|
||||
await run_upload_normal('service-monitor')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-monitor
|
||||
upload $root_path/service-monitor/target/service-monitor-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-patch.js
Normal file
15
bin/build-patch.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common'])
|
||||
await run_package('utils/patch')
|
||||
await run_upload_normal('**/patch-1.0.0-SNAPSHOT.jar')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package utils/patch
|
||||
upload $root_path/utils/patch/target/patch-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-pulsar-query.js
Normal file
15
bin/build-pulsar-query.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-pulsar-query')
|
||||
await run_upload_normal('service-pulsar-query')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-pulsar-query
|
||||
upload $root_path/service-pulsar-query/target/service-pulsar-query-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-queue.js
Normal file
15
bin/build-queue.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-queue')
|
||||
await run_upload_normal('service-queue')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-queue
|
||||
upload $root_path/service-queue/target/service-queue-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-scheduler.js
Normal file
15
bin/build-scheduler.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-scheduler')
|
||||
await run_upload_normal('service-scheduler')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-scheduler
|
||||
upload $root_path/service-scheduler/target/service-scheduler-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-sync.js
Normal file
15
bin/build-sync.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'utils/patch'])
|
||||
await run_package('utils/sync')
|
||||
await run_upload('**/sync-1.0.0-SNAPSHOT.jar')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest utils/patch
|
||||
package utils/sync
|
||||
upload $root_path/utils/sync/target/sync-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-uploader.js
Normal file
15
bin/build-uploader.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-uploader')
|
||||
await run_upload_normal('service-uploader')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-uploader
|
||||
ytp-transfer2 $root_path/service-uploader/target/service-uploader-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-web.js
Normal file
15
bin/build-web.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-web')
|
||||
await run_upload_normal('service-web')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-web
|
||||
upload $root_path/service-web/target/service-web-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-yarn-query.js
Normal file
15
bin/build-yarn-query.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-yarn-query')
|
||||
await run_upload_normal('service-yarn-query')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-yarn-query
|
||||
upload $root_path/service-yarn-query/target/service-yarn-query-1.0.0-SNAPSHOT.jar
|
||||
15
bin/build-zookeeper-query.js
Normal file
15
bin/build-zookeeper-query.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {cd, path} from 'zx'
|
||||
import {trim} from "licia";
|
||||
import {run_deploy_batch, run_deploy_root, run_package, run_upload, run_upload_normal} from "./library.js";
|
||||
|
||||
// 切换目录
|
||||
cd(trim(path.dirname(import.meta.dirname)))
|
||||
// 执行流程
|
||||
try {
|
||||
await run_deploy_root()
|
||||
await run_deploy_batch(['service-common', 'service-dependencies', 'service-configuration', 'service-forest'])
|
||||
await run_package('service-zookeeper-query')
|
||||
await run_upload_normal('service-zookeeper-query')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
source $root_path/bin/library.sh
|
||||
deploy service-common service-dependencies service-configuration service-forest
|
||||
package service-zookeeper-query
|
||||
upload $root_path/service-zookeeper-query/target/service-zookeeper-query-1.0.0-SNAPSHOT.jar
|
||||
80
bin/library.js
Normal file
80
bin/library.js
Normal file
@@ -0,0 +1,80 @@
|
||||
import {$, fetch, fs, glob, os, path, spinner, syncProcessCwd, usePowerShell} from 'zx'
|
||||
import {isEqual, trim} from "licia";
|
||||
|
||||
syncProcessCwd(true)
|
||||
if (isEqual(os.platform(), 'win32')) {
|
||||
usePowerShell()
|
||||
}
|
||||
|
||||
const maven_setting = '/Users/lanyuanxiaoyao/.m2/settings-nas.xml'
|
||||
|
||||
const upload_url = 'http://132.126.207.124:36800'
|
||||
const upload_username = 'AxhEbscwsJDbYMH2'
|
||||
const upload_password = 'cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4'
|
||||
|
||||
export const run_deploy = async (project) => {
|
||||
await spinner(
|
||||
`Deploying project ${project}`,
|
||||
() => $`mvn -pl ${project} clean deploy -D skipTests -s ${maven_setting}`
|
||||
)
|
||||
console.log(`✅ Finish deploy ${project}`)
|
||||
}
|
||||
|
||||
export const run_deploy_root = async () => {
|
||||
await spinner(
|
||||
`Deploying root`,
|
||||
() => $`mvn clean deploy -N -D skipTests -s ${maven_setting}`
|
||||
)
|
||||
console.log(`✅ Finish deploy root`)
|
||||
}
|
||||
|
||||
export const run_deploy_batch = async (projects) => {
|
||||
for (const project of projects) {
|
||||
await run_deploy(project)
|
||||
}
|
||||
}
|
||||
|
||||
export const run_package = async (project, profile = 'b2b12') => {
|
||||
await spinner(
|
||||
`Packaging project ${project} ${isEqual(profile, 'b2b12') ? '' : profile}`,
|
||||
() => $`mvn -pl ${project} clean package -D skipTests -P ${profile} -s ${maven_setting}`
|
||||
)
|
||||
console.log(`✅ Finish package ${project} ${isEqual(profile, 'b2b12') ? '' : profile}`)
|
||||
}
|
||||
|
||||
export const run_package_batch = async (projects) => {
|
||||
for (const project of projects) {
|
||||
await run_package(project)
|
||||
}
|
||||
}
|
||||
|
||||
const upload = async (file_path) => {
|
||||
let response = await spinner(
|
||||
`Uploading project ${file_path}`,
|
||||
() => fetch(`${upload_url}/file/upload/${path.basename(file_path)}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/octet-stream',
|
||||
'Authorization': `Basic ${Buffer.from(`${upload_username}:${upload_password}`).toString('base64')}`,
|
||||
},
|
||||
body: fs.createReadStream(file_path),
|
||||
duplex: 'half',
|
||||
})
|
||||
)
|
||||
|
||||
if (!isEqual(response.status, 200)) {
|
||||
throw response
|
||||
}
|
||||
console.log(`✅ Finish upload ${file_path}`)
|
||||
fs.rmSync(file_path)
|
||||
}
|
||||
|
||||
export const run_upload = async (pattern) => {
|
||||
for (let p of glob.sync(pattern)) {
|
||||
await upload(path.join(trim($.sync`pwd`.text()), p))
|
||||
}
|
||||
}
|
||||
|
||||
export const run_upload_normal = async (project) => {
|
||||
await run_upload(`${project}/target/${project}-1.0.0-SNAPSHOT.jar`)
|
||||
}
|
||||
18
bin/package.json
Normal file
18
bin/package.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "bin",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@webpod/ps": "^0.1.1",
|
||||
"chalk": "^5.4.1",
|
||||
"envapi": "^0.2.3",
|
||||
"fs-extra": "^11.3.0",
|
||||
"globby": "^14.1.0",
|
||||
"licia": "^1.48.0",
|
||||
"minimist": "^1.2.8",
|
||||
"node-fetch-native": "^1.6.6",
|
||||
"which": "^5.0.0",
|
||||
"yaml": "^2.8.0",
|
||||
"zx": "^8.5.4"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user