Mercurial > hg > mercurial
changeset 108:63fcc9b14221
update teamcity-common.xml and teamcity-plugin.xml
author | C:\Users\pavel.sher\AppData\Roaming\The Bat! |
---|---|
date | Fri, 02 Jul 2010 22:32:16 +0400 |
parents | d7330bc105aa |
children | 6ea2cd13db83 |
files | mercurial.properties teamcity-common.xml teamcity-plugin.xml |
diffstat | 3 files changed, 41 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial.properties Tue May 11 00:14:31 2010 +0400 +++ b/mercurial.properties Fri Jul 02 22:32:16 2010 +0400 @@ -1,5 +1,5 @@ path.variable.ant_home=C\:/Tools/apache-ant-1.7.1 path.variable.maven_repository=C\:/Documents and Settings/pavel.sher/.m2/repository -path.variable.teamcitydistribution=C\:/TeamCity51 +path.variable.teamcitydistribution=C\:/TeamCity path.variable.user_home_grails=C\:/Documents and Settings/pavel.sher/.grails path.variable.user_home_griffon=C\:/Documents and Settings/pavel.sher/.griffon \ No newline at end of file
--- a/teamcity-common.xml Tue May 11 00:14:31 2010 +0400 +++ b/teamcity-common.xml Fri Jul 02 22:32:16 2010 +0400 @@ -31,9 +31,14 @@ <attribute name="server.lib.dir" default="" description="directory to get libs for the server part"/> <attribute name="server.lib.includes" default="none should match" description="includes pattern of the files in the directory"/> <attribute name="plugin.version" default="SNAPSHOT" - description="the version of the plugin to put into teamcity-plugin.xml instead of '@version@'"/> + description="the version of the plugin to put into teamcity-plugin.xml instead of '@Plugin_Version@'"/> + <attribute name="plugin.vendor" default="Unknown vendor" + description="name of the vendor to put into teamcity-plugin.xml instead of '@Plugin_Vendor@'"/> + <attribute name="plugin.vendor.url" default="" + description="vendor URL to put into teamcity-plugin.xml instead of '@Plugin_Vendor_Url@'"/> - <element name="additional-files" optional="yes" description="fileset of the files to pack into root of the plugin"/> + <element name="server-additional-files" optional="yes" description="fileset of the files to pack into root of the server plugin part"/> + <element name="agent-additional-files" optional="yes" description="fileset of the files to pack into root of the agent plugin part"/> <sequential> @@ -91,17 +96,31 @@ <param name="common.jar.path" value="${teamcity.internal.distrib.prep.common}/@{common.jar.name}"/> </antcall> + <!-- copy additional agent files --> + <mkdir dir="${teamcity.internal.distrib.prep.agent.jars}/@{name}" /> + <copy todir="${teamcity.internal.distrib.prep.agent.jars}/@{name}"> + <fileset dir="${basedir}" excludes="**"/> + <agent-additional-files/> + </copy> + + <antcall target="pack.agent.part"> + <param name="out.unpacked" value="@{out.unpacked}"/> + <param name="name" value="@{name}"/> + </antcall> + <!-- copy teamcity-plugin.xml --> <antcall target="prepare.plugin.descriptor.file"> <param name="source" value="@{plugin.descriptor.file}"/> <param name="dest" value="@{out.unpacked}/teamcity-plugin.xml"/> <param name="plugin.version" value="@{plugin.version}"/> + <param name="plugin.vendor" value="@{plugin.vendor}"/> + <param name="plugin.vendor.url" value="@{plugin.vendor.url}"/> </antcall> - <!-- copy additional files --> - <copy todir="@{out.unpacked}" failonerror="false"> - <fileset dir="${basedir}" excludes="**/*"/> - <additional-files/> + <!-- copy additional server plugin files --> + <copy todir="@{out.unpacked}"> + <fileset dir="${basedir}" excludes="**"/> + <server-additional-files/> </copy> <!-- clean --> @@ -121,7 +140,7 @@ <target name="check.teamcitydistribution" description="checks whether TeamCity distribution ready to be used by IDEA-generated build"> <check.property name="path.variable.teamcitydistribution" - fail-message="Please define 'teamcity.distribution' or 'path.variable.teamcitydistribution' property in build.properties file (see build.properties.dist). The property should point to unpacked TeamCity .tar.gz or .exe distribution." + fail-message="Please define 'teamcity.distribution' or 'path.variable.teamcitydistribution' property (e.g. in build.properties file). The property should point to unpacked TeamCity .tar.gz or .exe distribution." /> <condition property="teamcity.distribution.not.present"> @@ -133,6 +152,7 @@ </condition> <fail if="teamcity.distribution.not.present" message="Cannot find TeamCity distribution at path '${path.variable.teamcitydistribution}'. The property 'teamcity.distribution' or 'path.variable.teamcitydistribution' should point to unpacked TeamCity .tar.gz or .exe distribution."/> + <echo message="Using ${path.variable.teamcitydistribution} as TeamCity distribution" /> </target> <macrodef name="deploy.teamcity.plugin"> @@ -223,6 +243,11 @@ </copy> </target> + <target name="pack.agent.part" if="agent.needed"> + <zip destfile="${out.unpacked}/agent/${name}.zip"> + <fileset dir="${teamcity.internal.distrib.prep.agent.jars}"/> + </zip> + </target> <target name="prepare.agent.part" if="agent.needed"> <!-- prepare.agent.part --> @@ -237,21 +262,18 @@ <copy todir="${teamcity.internal.distrib.prep.agent.jars}/${name}/lib" failonerror="false"> <fileset file="${common.jar.path}"/> </copy> - - <zip destfile="${out.unpacked}/agent/${name}.zip"> - <fileset dir="${teamcity.internal.distrib.prep.agent.jars}"/> - </zip> </target> <target name="prepare.plugin.descriptor.file" if="plugin.descriptor.file.needed"> <echo message="Copying plugin descriptor file '${source}' to '${dest}'."/> <copy file="${source}" tofile="${dest}" failonerror="false"/> - <echo message="Replacing '@Plugin_Version@' on '${plugin.version}' in the copied plugin descriptor file."/> - <replace file="${dest}" value="${plugin.version}"> + <echo message="Replacing '@Plugin_Version@', '@Plugin_Vendor@' and '@Plugin_Vendor_Url@' in the copied plugin descriptor file."/> + <replace file="${dest}"> + <replacefilter token="@version@" value="${plugin.version}"/> <replacefilter token="@Plugin_Version@" value="${plugin.version}"/> - <replacefilter token="@Plugin_Vendor@" value="JetBrains, s.r.o."/> - <replacefilter token="@Plugin_Vendor_Url@" value="http://www.jetbrains.com"/> + <replacefilter token="@Plugin_Vendor@" value="${plugin.vendor}"/> + <replacefilter token="@Plugin_Vendor_Url@" value="${plugin.vendor.url}"/> </replace> </target> @@ -263,4 +285,4 @@ message="It seems you are trying to use the script several times in the same context. This script does not support such use. Please call this script as a separate Ant process, via 'ant' task."/> </target> -</project> +</project> \ No newline at end of file
--- a/teamcity-plugin.xml Tue May 11 00:14:31 2010 +0400 +++ b/teamcity-plugin.xml Fri Jul 02 22:32:16 2010 +0400 @@ -6,8 +6,8 @@ <display-name>VCS Support: Mercurial</display-name> <version>@Plugin_Version@</version> <vendor> - <name>@Plugin_Vendor@</name> - <url>@Plugin_Vendor_Url@</url> + <name>JetBrains, s.r.o.</name> + <url>http://www.jetbrains.com</url> </vendor> </info> <deployment use-separate-classloader="false"/>