From fd0bd53a73b264cea55e2e73805e7cfd78825beb Mon Sep 17 00:00:00 2001 From: cheney Date: Tue, 9 Aug 2022 14:39:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=89=93=E5=8C=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kit.json | 60 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/kit.json b/kit.json index 3378fce..67c2bc9 100644 --- a/kit.json +++ b/kit.json @@ -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%/" } ]