Move artefacts for update site to TeamCity
This commit is contained in:
parent
a3aa92e60a
commit
49e5302b34
14
build.gradle
14
build.gradle
|
|
@ -97,27 +97,27 @@ task setup(dependsOn: allInitDependencies) {
|
|||
}
|
||||
}
|
||||
|
||||
def tagMatcher() {
|
||||
System.env.TRAVIS_TAG =~ /v([0-9.]+)-.*\.([0-9]+)/
|
||||
def buildNumber() {
|
||||
System.env.BUILD_NUMBER =~ /MPS-([0-9]+)\.([0-9]+).([0-9]+)-([0-9]+)/
|
||||
}
|
||||
|
||||
task generateUpdatePluginsXml {
|
||||
onlyIf {
|
||||
tagMatcher().find()
|
||||
buildNumber().find()
|
||||
}
|
||||
doLast {
|
||||
def updatesDir = project.projectDir.absolutePath + "/build/artifacts/coderules/updates"
|
||||
mkdir(updatesDir)
|
||||
|
||||
def baseUrl = "https://github.com/JetBrains/mps-coderules/releases/download"
|
||||
def baseUrl = "https://teamcity.jetbrains.com/guestAuth/repository/download/MPS_20211_Distribution_MpsCodeRules"
|
||||
def zip = "/jebtrains.mps.coderules-0.9-SNAPSHOT.zip"
|
||||
|
||||
file(updatesDir + "/updatePlugins.xml").withWriter { w ->
|
||||
new MarkupBuilder(new IndentPrinter(w, " ", true)).
|
||||
plugins {
|
||||
plugin( id: "jetbrains.mps.coderules" ,
|
||||
url: baseUrl + "/$System.env.TRAVIS_TAG" + zip ,
|
||||
version: "${tagMatcher()[0][1]}-b${tagMatcher()[0][2]}" )
|
||||
url: baseUrl + "/$System.env.BUILD_NUMBER" + zip ,
|
||||
version: "${buildNumber()[0][1]}.${buildNumber()[0][2]}-b${buildNumber()[0][4]}" )
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ ant.taskdef(name: 'junit',
|
|||
ant.importBuild('build.xml') { antTarget ->
|
||||
'coderules-'+antTarget
|
||||
}
|
||||
ant.properties.'ci.build.num' = "${tagMatcher().find() ? tagMatcher()[0][2] : '9999'}".toString()
|
||||
ant.properties.'ci.build.num' = "${buildNumber().find() ? buildNumber()[0][4] : '9999'}".toString()
|
||||
|
||||
// ensure 'setup' runs before 'fetchDependencies' and 'declare-mps-tasks'
|
||||
'coderules-fetchDependencies' {
|
||||
|
|
|
|||
Loading…
Reference in New Issue