更新打包脚本

This commit is contained in:
cheney 2022-08-09 14:39:36 +08:00
parent f360712042
commit fd0bd53a73

View File

@ -1,15 +1,11 @@
{ {
"vars": { "vars": {
"version": "git()", "version": "%project.git_branch_version%",
"out_path": "./pack", "out_path": "./pack"
"target_f1": "./target/sydapi4j-jar-with-dependencies.jar",
"target_t1": "%out_path%/sydapi4j-jar-with-dependencies.jar",
"target_f2": "./target/sydapi4j.jar",
"target_t2": "%out_path%/sydapi4j.jar"
}, },
"clear": [ "clear": [
{ {
"func": "rmdir", "func": "rm",
"path": "%out_path%" "path": "%out_path%"
} }
], ],
@ -31,35 +27,53 @@
"path": "%out_path%/doc" "path": "%out_path%/doc"
} }
], ],
"dependencies": [{
"func" : "pom",
"xml" : "%out_path%/jar"
}, {
"cmd" : "mvn dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=%out_path%/jar/dependences",
"check": "BUILD SUCCESS"
}],
"gen" : [{ "gen" : [{
"cmd" : "dproto" "cmd" : "dproto"
}], }],
"build": [ "build": [
{ {
"cmd": "mvn package -DskipTests", "cmd": "clear"
},
{
"cmd": "init"
},
{
"shell": "mvn package -DskipTests",
"check": "BUILD SUCCESS" "check": "BUILD SUCCESS"
}, },
{ {
"func": "mv", "func": "cp",
"from": "%target_f1%", "from": "./target/sydapi4j.jar",
"to": "%target_t1%" "to": "%out_path%/jar/sydapi4j.jar"
}, },
{ {
"func": "mv", "func": "cp",
"from": "%target_f2%", "from": "./target/sydapi4j-jar-with-dependencies.jar",
"to": "%target_t2%" "to": "%out_path%/jar/sydapi4j-jar-with-dependencies.jar"
},
{
"shell" : "mvn dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=%out_path%/jar/dependences",
"check": "BUILD SUCCESS"
},
{
"func": "cp",
"from": "./src/test/java/sample",
"to": "%out_path%/sample"
},
{
"func": "cp",
"from": "./说明.txt",
"to": "%out_path%/说明.txt"
}, },
{ {
"func": "zip", "func": "zip",
"from": "%out_path%", "from": "%out_path%/*",
"to": "%out_path%/sydapi-%version%.zip" "to": "%out_path%/sydapi-%version%.%project.git_commit_hash%.zip"
},
{
"func": "open",
"path": "%out_path%/"
} }
] ]