add deploy task

This commit is contained in:
CaiHQ 2022-04-22 14:10:09 +08:00
parent 519d4866ab
commit e189925de7
3 changed files with 23 additions and 3 deletions

View File

@ -1,6 +1,11 @@
buildscript {
repositories{
mavenCentral()
mavenLocal()
}
dependencies {
classpath files("buildlibs/simple-ypk-packer-0.3.0.jar")
classpath "org.bdware.bdcontract:simple-ypk-packer:0.3.0"
classpath "org.bdware.bdcontract:ypk-deploy-tool:0.4.0"
}
}
plugins {
@ -69,7 +74,7 @@ task copyJar(type: Copy, dependsOn: [":backend:jar", ":backend:copyLibs"]) {
}
def reltivePath = "./backend"
//reltivePath="."
def currVersion = "0.1.0"
def currVersion = "1.1.0"
task grepCP (dependsOn:["copyJar"]){
doLast {
org.bdware.datanet.YPKPacker.grepCPLibWithFilter("${reltivePath}/cplibs/libs","${reltivePath}/build/output/libs","${reltivePath}/grepcp.list")
@ -87,4 +92,9 @@ task buildYPK(dependsOn: ["buildZip"]) {
doLast {
org.bdware.datanet.YPKPacker.staticPack("${reltivePath}/build/contractexample.zip", "${reltivePath}/build/contractexample-${currVersion}.ypk")
}
}
task deploy(dependsOn: ["buildYPK"]){
doLast {
org.bdware.ypkdeploy.HTTPTool.batchRun("./backend/deployconfig.json", true)
}
}

10
backend/deployconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"host": "ip",
"privateKey": "e85ce2f4d8...",
"publicKey": "04da01345770b7e09d4774bf6cd67bf90b32eaa09f517c79b2d1f9b8a926",
"ypkPath": "./backend/build/contractexample-1.1.0.ypk",
"killBeforeStart": "ContractID/ContractName",
"createParam": {
},
"agentPort": 21030
}

View File

@ -2,7 +2,7 @@ plugins {
id 'java'
id 'idea'
}
def currVersion = "1.0.0"
def currVersion = "1.1.0"
ext.projectIds = ['group': 'org.bdware.sc.contractexample', 'version': currVersion]
tasks.withType(JavaCompile) {