From e18cfab77dc1829134d3bee058c9d225a57f7f38 Mon Sep 17 00:00:00 2001 From: cheney Date: Fri, 15 Jul 2022 14:35:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + kit.json | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 kit.json diff --git a/.gitignore b/.gitignore index d6436e9..44c2c55 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /.DS_Store src/test/java/com/sunyard/sydapi/sample/*.* *.p7 +/pack/ diff --git a/kit.json b/kit.json new file mode 100644 index 0000000..015e89e --- /dev/null +++ b/kit.json @@ -0,0 +1,73 @@ +{ + "vars": { + "version": "%project.git_branch_version%", + "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": [ + { + "func": "rmdir", + "path": "%out_path%" + } + ], + "init": [ + { + "func": "mkdir", + "path": "%out_path%" + }, + { + "func": "mkdir", + "path": "%out_path%/jar" + }, + { + "func": "mkdir", + "path": "%out_path%/jar/dependences" + }, + { + "func": "mkdir", + "path": "%out_path%/doc" + } + ], + "dependencies": [{ + "func" : "pom", + "xml" : "%out_path%/jar" + }, { + "shell" : "mvn dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=%out_path%/jar/dependences", + "check": "BUILD SUCCESS" + }], + "gen" : [{ + "shell" : "dproto" + }], + "build": [ + { + "cmd" : "init" + }, + { + "shell": "mvn package -DskipTests", + "check": "BUILD SUCCESS" + }, + { + "func": "cp", + "from": "%target_f1%", + "to": "%target_t1%" + }, + { + "func": "cp", + "from": "%target_f2%", + "to": "%target_t2%" + }, + { + "func": "zip", + "from": "%out_path%", + "to": "%out_path%/sydapi-%version%.zip" + }, + { + "func": "open", + "path": "%out_path%" + } + ] + +}