Эх сурвалжийг харах

增加clear_deploy,重新部署不删除原来的数据和配置

huqi 5 жил өмнө
parent
commit
efea07e68f
2 өөрчлөгдсөн 12 нэмэгдсэн , 0 устгасан
  1. 11 0
      gulpfile.js
  2. 1 0
      package.json

+ 11 - 0
gulpfile.js

@@ -431,7 +431,18 @@ function clear_build(cb){
     del(dest, { force: true });
     cb();
 }
+function clear_deploy(cb){
+    console.log(`---------------------------------------------------------------------
+  . clear old deploy ...
+---------------------------------------------------------------------`);
+    var dest = ["target/o2server/store/", "target/o2server/commons/", "target/o2server/jvm/", "target/o2server/configSample/", "target/o2server/localSample/", "target/o2server/servers/"];
+    dest = dest.concat(["target/o2server/*.sh", "target/o2server/*.jar", "target/o2server/*.html", "target/o2server/*.bat", "target/o2server/version.o2"]);
+    console.log(dest)
+    del(dest, { force: true });
+    cb();
+}
 exports.clear_build = clear_build;
+exports.clear_deploy = clear_deploy;
 
 
 function deploy_server(){

+ 1 - 0
package.json

@@ -26,6 +26,7 @@
                 "deploy:rpi": "gulp deploy --e raspberrypi",
                 "typeInfor": "type welcome && echo Your server is build success: target/o2server/",
                 "clear": "gulp clear_build",
+                "clear_deploy": "gulp clear_deploy",
                 "build": "npm run clear && npm run build_parallel && npm run deploy && npm run typeInfor",
                 "build:win": "npm run clear && npm run build_parallel && npm run deploy:win && npm run typeInfor",
                 "build:linux": "npm run clear  && npm run build_parallel && npm run deploy:linux && npm run typeInfor",