From 3e15dc9d079e212f41e804a049cdc863d7d0ab55 Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Tue, 6 Jun 2023 18:00:48 +0800 Subject: [PATCH] release 0.7.3 --- build.gradle | 4 ++-- src/main/java/org/bdware/ypkdeploy/CodeRepoTool.java | 9 +++++++-- .../org/bdware/ypkdeploy/SmartContractClientExt.java | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index fbce79a..15bb5a6 100755 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'signing' } group "org.bdware.bdcontract" -version "0.7.2" +version "0.7.3" sourceCompatibility = 1.8 repositories { mavenCentral() @@ -20,7 +20,7 @@ dependencies { implementation 'org.bouncycastle:bcprov-jdk15on:1.69' implementation 'org.apache.httpcomponents:httpclient:4.5.13' implementation 'org.apache.httpcomponents:httpmime:4.5.13' - implementation 'org.bdware.doip:bdosclient:0.0.6' + implementation 'org.bdware.doip:bdosclient:0.0.7' // implementation 'org.bdware.doip:doip-audit-tool:1.2.4' testImplementation 'junit:junit:4.13.2' } diff --git a/src/main/java/org/bdware/ypkdeploy/CodeRepoTool.java b/src/main/java/org/bdware/ypkdeploy/CodeRepoTool.java index 4f1f8bf..ed4cce1 100644 --- a/src/main/java/org/bdware/ypkdeploy/CodeRepoTool.java +++ b/src/main/java/org/bdware/ypkdeploy/CodeRepoTool.java @@ -15,13 +15,14 @@ public class CodeRepoTool { } - public static void publish(String publishConfig) throws Exception { + public static void publish(String publishConfig, String ypkPath) throws Exception { FileStorage storage = new FileStorage(publishConfig); EndpointConfig endpointConfig = storage.loadAsEndpointConfig(); AuditIrpClient irpClient = new AuditIrpClient(endpointConfig); JsonObject arg = storage.load(); CodeRepoClient client = new CodeRepoClient(arg.get("codeRepoId").getAsString(), irpClient, SM2KeyPair.fromJson(arg.toString())); - String ypkPath = arg.get("ypkPath").getAsString(); + if (ypkPath == null) + ypkPath = arg.get("ypkPath").getAsString(); AtomicInteger result = new AtomicInteger(0); client.createAndUpload(ypkPath, new CodeRepoClient.ProgressCallback() { @Override @@ -51,4 +52,8 @@ public class CodeRepoTool { Thread.yield(); } } + + public static void publish(String publishConfig) throws Exception { + publish(publishConfig, null); + } } diff --git a/src/main/java/org/bdware/ypkdeploy/SmartContractClientExt.java b/src/main/java/org/bdware/ypkdeploy/SmartContractClientExt.java index 848ba6c..09aaa97 100644 --- a/src/main/java/org/bdware/ypkdeploy/SmartContractClientExt.java +++ b/src/main/java/org/bdware/ypkdeploy/SmartContractClientExt.java @@ -157,7 +157,7 @@ public class SmartContractClientExt extends SmartContractClient { @Override public void onLogin(JsonObject obj) { - LOGGER.info(obj.toString()); +// LOGGER.info(obj.toString()); isLoggedIn = true; }