mirror of
https://gitee.com/BDWare/contract-java-example.git
synced 2025-01-10 09:54:08 +00:00
add deploy task
This commit is contained in:
parent
519d4866ab
commit
e189925de7
@ -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")
|
||||
@ -88,3 +93,8 @@ task buildYPK(dependsOn: ["buildZip"]) {
|
||||
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
10
backend/deployconfig.json
Normal 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
|
||||
}
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user