Use proper property name to get a tag to publish.

Also:
* remove obsolete kotlin.compiler.* properties
* move --tag argument to proper place (from npm to publish-to-npm)
This commit is contained in:
Zalim Bashorov
2017-08-15 14:54:12 +03:00
parent 34681b1459
commit 9bb7ed5e02
+6 -7
View File
@@ -3,8 +3,7 @@
<!-- Expected that these properties will be overridden by system properties -->
<property name="kotlin.deploy.version" value="0.0.0"/>
<property name="kotlin.compiler.deploy.tag" value="dev"/>
<property name="kotlin.compiler.deploy.version" value="${kotlin.deploy.version}"/>
<property name="kotlin.deploy.tag" value="dev"/>
<property name="kotlin.npmjs.auth.token" value="AUTH"/>
<property name="node.version" value="v6.3.1"/>
@@ -67,7 +66,6 @@
<macrodef name="npm">
<attribute name="command"/>
<attribute name="tag" default="${kotlin.compiler.deploy.tag}"/>
<attribute name="dir" default="."/>
<attribute name="failonerror" default="true"/>
<element name="args" optional="true" implicit="true"/>
@@ -76,8 +74,6 @@
<node dir="@{dir}" failonerror="@{failonerror}">
<arg file="${node.dir}/lib/node_modules/npm/bin/npm-cli.js"/>
<arg value="@{command}"/>
<arg value="--tag"/>
<arg value="@{tag}"/>
<args/>
</node>
</sequential>
@@ -86,6 +82,7 @@
<macrodef name="publish-to-npm">
<attribute name="template"/>
<attribute name="version"/>
<attribute name="tag"/>
<element name="actions" optional="true" implicit="true"/>
<sequential>
<property name="deploy_to_npm_dir" value="${output}/deploy_to_npm"/>
@@ -105,19 +102,21 @@
</npm>
<npm command="publish" dir="${package_deploy_dir}">
<arg value="--//registry.npmjs.org/:_authToken=${kotlin.npmjs.auth.token}"/>
<arg value="--tag"/>
<arg value="@{tag}"/>
</npm>
</sequential>
</macrodef>
<target name="publish-kotlin-js-to-npm">
<publish-to-npm template="kotlin" version="${kotlin.deploy.version}">
<publish-to-npm template="kotlin" version="${kotlin.deploy.version}" tag="${kotlin.deploy.tag}">
<copy file="${js.stdlib.output.dir}/kotlin.js" todir="${package_deploy_dir}" failonerror="true" />
<copy file="${js.stdlib.output.dir}/kotlin.meta.js" todir="${package_deploy_dir}" failonerror="true" />
</publish-to-npm>
</target>
<target name="publish-kotlin-compiler-to-npm">
<publish-to-npm template="kotlin-compiler" version="${kotlin.compiler.deploy.version}">
<publish-to-npm template="kotlin-compiler" version="${kotlin.deploy.version}" tag="${kotlin.deploy.tag}">
<copy todir="${package_deploy_dir}" failonerror="true" >
<fileset dir="${output}/kotlinc" />
</copy>