Automating updates file generation and upload using Travis CI.
This commit is contained in:
parent
114f4b8079
commit
8c81df5fae
24
.travis.yml
24
.travis.yml
|
|
@ -3,10 +3,20 @@ jdk: oraclejdk8
|
|||
install: true
|
||||
script: ./gradlew test
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: dOEX78/Th6n5XAbfQKT8DCQbQOqE9C4etqtH7OsI4snYAUkZdxHmdmuFWoMqwnU9nbR+17+2f9XPpE9BfslnxMP21lvn6AP5jScFgeZzV1KJ7kPg1H8buxLvGiQLq1vjNBrmT/Fg5S7tZFWSljEVKRQczpbijdtiTTzdRu/dGCPrLJiijS1uSJet6AwJ4qd+HIXsrVlPny5XL36SCiF88HiYO1vMQFo3pOPCrELfSLHHmLohcdcLy21BTMsbaZwrFzgb4xnmoFRRMiqVOi0z/zOTCNz6AWwfZ+RrAS2YmBSMeIL0R0K22P1WStg1NiYYaapoMf1AESW0VdKm6bSxD2SgxdG7V0hGbOFpzd5uZ22PxtishIfWerwvHCOey2JgH/xl4oGmLqwxmaWJMIrsWI5ObSePFbukKH6kkdGCrZq83cnJonYNb8KckBN997iQI12AKahUDnHg+Se62KANqogcWpWCztCAzgyqOb0swYBQ53vUzwciwul2yzr8Hrm5N32OY9UcK5Hx9pRtSr3c9ykJybdPnzUcCJGdxvNdDek21fx41q+1Qr2EgeJon8BmBpyLwfngIL3DRFEcfxQzramV6kVRI1T67Pk6xD+mVrYDGFbGAGkElEvdrlnOFzWv0Pza8cIv9i13B4sNdQOYtyEwaT0UvzklMVHw8ifYT0M=
|
||||
file: build/artifacts/typechecking-plugin//typechecking-0.2.zip
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
- provider: releases
|
||||
api_key:
|
||||
secure: dOEX78/Th6n5XAbfQKT8DCQbQOqE9C4etqtH7OsI4snYAUkZdxHmdmuFWoMqwnU9nbR+17+2f9XPpE9BfslnxMP21lvn6AP5jScFgeZzV1KJ7kPg1H8buxLvGiQLq1vjNBrmT/Fg5S7tZFWSljEVKRQczpbijdtiTTzdRu/dGCPrLJiijS1uSJet6AwJ4qd+HIXsrVlPny5XL36SCiF88HiYO1vMQFo3pOPCrELfSLHHmLohcdcLy21BTMsbaZwrFzgb4xnmoFRRMiqVOi0z/zOTCNz6AWwfZ+RrAS2YmBSMeIL0R0K22P1WStg1NiYYaapoMf1AESW0VdKm6bSxD2SgxdG7V0hGbOFpzd5uZ22PxtishIfWerwvHCOey2JgH/xl4oGmLqwxmaWJMIrsWI5ObSePFbukKH6kkdGCrZq83cnJonYNb8KckBN997iQI12AKahUDnHg+Se62KANqogcWpWCztCAzgyqOb0swYBQ53vUzwciwul2yzr8Hrm5N32OY9UcK5Hx9pRtSr3c9ykJybdPnzUcCJGdxvNdDek21fx41q+1Qr2EgeJon8BmBpyLwfngIL3DRFEcfxQzramV6kVRI1T67Pk6xD+mVrYDGFbGAGkElEvdrlnOFzWv0Pza8cIv9i13B4sNdQOYtyEwaT0UvzklMVHw8ifYT0M=
|
||||
file: build/artifacts/typechecking-plugin//typechecking-0.2.zip
|
||||
skip_cleanup: true
|
||||
on:
|
||||
branch: master
|
||||
tags: true
|
||||
- provider: pages
|
||||
skip_cleanup: true
|
||||
github_token:
|
||||
secure: dOEX78/Th6n5XAbfQKT8DCQbQOqE9C4etqtH7OsI4snYAUkZdxHmdmuFWoMqwnU9nbR+17+2f9XPpE9BfslnxMP21lvn6AP5jScFgeZzV1KJ7kPg1H8buxLvGiQLq1vjNBrmT/Fg5S7tZFWSljEVKRQczpbijdtiTTzdRu/dGCPrLJiijS1uSJet6AwJ4qd+HIXsrVlPny5XL36SCiF88HiYO1vMQFo3pOPCrELfSLHHmLohcdcLy21BTMsbaZwrFzgb4xnmoFRRMiqVOi0z/zOTCNz6AWwfZ+RrAS2YmBSMeIL0R0K22P1WStg1NiYYaapoMf1AESW0VdKm6bSxD2SgxdG7V0hGbOFpzd5uZ22PxtishIfWerwvHCOey2JgH/xl4oGmLqwxmaWJMIrsWI5ObSePFbukKH6kkdGCrZq83cnJonYNb8KckBN997iQI12AKahUDnHg+Se62KANqogcWpWCztCAzgyqOb0swYBQ53vUzwciwul2yzr8Hrm5N32OY9UcK5Hx9pRtSr3c9ykJybdPnzUcCJGdxvNdDek21fx41q+1Qr2EgeJon8BmBpyLwfngIL3DRFEcfxQzramV6kVRI1T67Pk6xD+mVrYDGFbGAGkElEvdrlnOFzWv0Pza8cIv9i13B4sNdQOYtyEwaT0UvzklMVHw8ifYT0M=
|
||||
on:
|
||||
branch: master
|
||||
tags: true
|
||||
target_branch: updates
|
||||
local_dir: build/artifacts/typechecking-plugin/updates
|
||||
|
|
|
|||
38
build.gradle
38
build.gradle
|
|
@ -1,3 +1,6 @@
|
|||
import groovy.xml.MarkupBuilder
|
||||
import java.util.regex.*
|
||||
|
||||
defaultTasks 'init'
|
||||
|
||||
allprojects {
|
||||
|
|
@ -71,11 +74,39 @@ task init(dependsOn: allInitDependencies) {
|
|||
}
|
||||
}
|
||||
|
||||
def tagMatcher() {
|
||||
System.env.TRAVIS_TAG =~ /v([0-9.]+)-.*\.([0-9]+)/
|
||||
}
|
||||
|
||||
task generateUpdatePluginsXml {
|
||||
onlyIf {
|
||||
tagMatcher().find()
|
||||
}
|
||||
doLast {
|
||||
def updatesDir = project.projectDir.absolutePath + "/build/artifacts/typechecking-plugin/updates"
|
||||
mkdir(updatesDir)
|
||||
|
||||
def baseUrl = "https://github.com/fisakov/constraints-typechecking/releases/download"
|
||||
def zip = "/typechecking-0.2.zip"
|
||||
|
||||
file(updatesDir + "/updatePlugins.xml").withWriter { w ->
|
||||
new MarkupBuilder(new IndentPrinter(w, " ", true)).
|
||||
plugins {
|
||||
plugin( id: "jetbrains.mps.typechecking" ,
|
||||
url: baseUrl + "/$System.env.TRAVIS_TAG" + zip ,
|
||||
version: "${tagMatcher()[0][1]}-b${tagMatcher()[0][2]}" )
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ant.taskdef(name: 'junit',
|
||||
classname: 'org.apache.tools.ant.taskdefs.optional.junit.JUnitTask',
|
||||
classpath: configurations.junitAnt.asPath)
|
||||
|
||||
ant.importBuild('build.xml')
|
||||
ant.properties.'ci.build.num' = "${tagMatcher().find() ? tagMatcher()[0][2] : '0'}".toString()
|
||||
|
||||
// ensure 'init' runs before 'fetchDependencies' and 'declare-mps-tasks'
|
||||
fetchDependencies {
|
||||
|
|
@ -99,3 +130,10 @@ classes {
|
|||
'generate'
|
||||
}
|
||||
}
|
||||
|
||||
assemble {
|
||||
finalizedBy {
|
||||
'generateUpdatePluginsXml'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<property name="build.dir" location="build" />
|
||||
<property name="build.tmp" location="${build.dir}/tmp/typechecking-plugin" />
|
||||
<property name="build.layout" location="${build.dir}/artifacts/typechecking-plugin" />
|
||||
<property name="ci.build.num" value="0" />
|
||||
<property name="mps.macro.logic_home" location="${basedir}" />
|
||||
<property name="mps_home" location="${basedir}/MPS_HOME" />
|
||||
<property name="artifacts.mps" location="${mps_home}" />
|
||||
|
|
@ -838,7 +839,7 @@
|
|||
<id>jetbrains.mps.typechecking</id>
|
||||
<name>Typechecking with Constraint Rules</name>
|
||||
<description>Experimental support for type checking with constraint rules</description>
|
||||
<version>0.2-b17</version>
|
||||
<version>2.0-b${ci.build.num}</version>
|
||||
<vendor url="jetbrains.com/mps">JetBrains s.r.o.</vendor>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
|
|
@ -1348,7 +1349,7 @@
|
|||
<zipfileset dir="${basedir}/typechecking/solutions/jetbrains.mps.typechecking/lib" prefix="typechecking/lib" />
|
||||
<fileset dir="${build.tmp}/default/typechecking-0.2.zip" />
|
||||
</zip>
|
||||
<echo file="${build.layout}/build.properties">mps.build.number=${mps.build.number}${line.separator}mps.date=${mps.date}${line.separator}mps.build.vcs.number=${mps.build.vcs.number}${line.separator}mps.teamcity.buildConfName=${mps.teamcity.buildConfName}${line.separator}mps.idea.platform.build.number=${mps.idea.platform.build.number}${line.separator}mps.mps.build.counter=${mps.mps.build.counter}${line.separator}mpsBootstrapCore.version=${mpsBootstrapCore.version}</echo>
|
||||
<echo file="${build.layout}/build.properties">typechecking-plugin.ci.build.num=${ci.build.num}${line.separator}mps.build.number=${mps.build.number}${line.separator}mps.date=${mps.date}${line.separator}mps.build.vcs.number=${mps.build.vcs.number}${line.separator}mps.teamcity.buildConfName=${mps.teamcity.buildConfName}${line.separator}mps.idea.platform.build.number=${mps.idea.platform.build.number}${line.separator}mps.mps.build.counter=${mps.mps.build.counter}${line.separator}mpsBootstrapCore.version=${mpsBootstrapCore.version}</echo>
|
||||
</target>
|
||||
|
||||
<target name="buildDependents" />
|
||||
|
|
|
|||
|
|
@ -26,9 +26,15 @@
|
|||
</language>
|
||||
<language id="798100da-4f0a-421a-b991-71f8c50ce5d2" name="jetbrains.mps.build">
|
||||
<concept id="5481553824944787378" name="jetbrains.mps.build.structure.BuildSourceProjectRelativePath" flags="ng" index="55IIr" />
|
||||
<concept id="2755237150521975431" name="jetbrains.mps.build.structure.BuildVariableMacroInitWithString" flags="ng" index="aVJcg">
|
||||
<child id="2755237150521975437" name="value" index="aVJcq" />
|
||||
</concept>
|
||||
<concept id="7321017245476976379" name="jetbrains.mps.build.structure.BuildRelativePath" flags="ng" index="iG8Mu">
|
||||
<child id="7321017245477039051" name="compositePart" index="iGT6I" />
|
||||
</concept>
|
||||
<concept id="3767587139141066978" name="jetbrains.mps.build.structure.BuildVariableMacro" flags="ng" index="2kB4xC">
|
||||
<child id="2755237150521975432" name="initialValue" index="aVJcv" />
|
||||
</concept>
|
||||
<concept id="4993211115183325728" name="jetbrains.mps.build.structure.BuildProjectDependency" flags="ng" index="2sgV4H">
|
||||
<reference id="5617550519002745380" name="script" index="1l3spb" />
|
||||
<child id="4129895186893471026" name="artifacts" index="2JcizS" />
|
||||
|
|
@ -73,6 +79,9 @@
|
|||
<concept id="4903714810883702019" name="jetbrains.mps.build.structure.BuildTextStringPart" flags="ng" index="3Mxwew">
|
||||
<property id="4903714810883755350" name="text" index="3MwjfP" />
|
||||
</concept>
|
||||
<concept id="4903714810883702017" name="jetbrains.mps.build.structure.BuildVarRefStringPart" flags="ng" index="3Mxwey">
|
||||
<reference id="4903714810883702018" name="macro" index="3Mxwex" />
|
||||
</concept>
|
||||
</language>
|
||||
<language id="ceab5195-25ea-4f22-9b92-103b95ca8c0c" name="jetbrains.mps.lang.core">
|
||||
<concept id="1169194658468" name="jetbrains.mps.lang.core.structure.INamedConcept" flags="ng" index="TrEIO">
|
||||
|
|
@ -177,8 +186,11 @@
|
|||
</node>
|
||||
</node>
|
||||
<node concept="3_J27D" id="7BVjoXzUx6a" role="m$_w8">
|
||||
<node concept="3Mxwew" id="7BVjoXzUx6l" role="3MwsjC">
|
||||
<property role="3MwjfP" value="0.2-b17" />
|
||||
<node concept="3Mxwew" id="2BiN_P7R7Wi" role="3MwsjC">
|
||||
<property role="3MwjfP" value="2.0-b" />
|
||||
</node>
|
||||
<node concept="3Mxwey" id="2BiN_P7R81m" role="3MwsjC">
|
||||
<ref role="3Mxwex" node="2BiN_P7R7jO" resolve="ci.build.num" />
|
||||
</node>
|
||||
</node>
|
||||
<node concept="3_J27D" id="3AC_dXTSEnT" role="3s6cr7">
|
||||
|
|
@ -1521,6 +1533,16 @@
|
|||
<ref role="398BVh" node="7Ant4WkHLn3" resolve="mps_home" />
|
||||
</node>
|
||||
</node>
|
||||
<node concept="2kB4xC" id="2BiN_P7R7jO" role="1l3spd">
|
||||
<property role="TrG5h" value="ci.build.num" />
|
||||
<node concept="aVJcg" id="2BiN_P7R7Ma" role="aVJcv">
|
||||
<node concept="NbPM2" id="2BiN_P7R7M9" role="aVJcq">
|
||||
<node concept="3Mxwew" id="2BiN_P7R7M8" role="3MwsjC">
|
||||
<property role="3MwjfP" value="0" />
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node concept="398rNT" id="46o4wsH3mv_" role="1l3spd">
|
||||
<property role="TrG5h" value="mps.macro.logic_home" />
|
||||
<node concept="55IIr" id="46o4wsH3mGg" role="398pKh" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue