更新打包脚本

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": {
"version": "git()",
"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"
"version": "%project.git_branch_version%",
"out_path": "./pack"
},
"clear": [
{
"func": "rmdir",
"func": "rm",
"path": "%out_path%"
}
],
@ -31,35 +27,53 @@
"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" : [{
"cmd" : "dproto"
}],
"build": [
{
"cmd": "mvn package -DskipTests",
"cmd": "clear"
},
{
"cmd": "init"
},
{
"shell": "mvn package -DskipTests",
"check": "BUILD SUCCESS"
},
{
"func": "mv",
"from": "%target_f1%",
"to": "%target_t1%"
"func": "cp",
"from": "./target/sydapi4j.jar",
"to": "%out_path%/jar/sydapi4j.jar"
},
{
"func": "mv",
"from": "%target_f2%",
"to": "%target_t2%"
"func": "cp",
"from": "./target/sydapi4j-jar-with-dependencies.jar",
"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",
"from": "%out_path%",
"to": "%out_path%/sydapi-%version%.zip"
"from": "%out_path%/*",
"to": "%out_path%/sydapi-%version%.%project.git_commit_hash%.zip"
},
{
"func": "open",
"path": "%out_path%/"
}
]