Create code snippets for Build Automator

Build Automator does not yet have the ability to include scripts which makes it a bit awkward and time consuming to use the same code in multiple scripts by duplicating the actions.

While the option to use include scripts, there is a simple but effective workaround for this problem.  Select the block of actions that you want to use in multiple scripts and paste them into a text editor.  What you get is an XML text that includes all the actions you specified.  You can then open this xml file, copy the text from it and paste it into an appropriate place in your script. 

What I do is save those code snippets as XML files in a subfolder from the project folder, that way it's easy to find them.  Using variables to set values that are used in several places in the script makes it easier to work with as you only need to set them at the beginning of the copied code.  In the screenshot below you can see the selected action items that are in one of my code snippets that updates and commits a project to Subversion using TortoiseProc.exe.  I also extract the build number from the Subversion repository using a free SVN command line client, which will be included in the next major release of Build Automator. 

 

 2013-05-20-BA-CodeSnippet.png

Below I'm including the actual xml script, which I saved as "VersionControl_PrepareToCopy.xml"

 

<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorProject >
<ProjectSettings>
<Data>
  <projectguid><![CDATA[C4DDCB67-7B44-4F4A-B196-02D6330A0AC5]]></projectguid>
  <projectname><![CDATA[POToolbar]]></projectname>
  <projectfolder><![CDATA[T:\Shared Documents\Build Automator Projects\PowerOffice\POToolbar.aprj]]></projectfolder>
  <createdate>0</createdate>
  <createtime>0</createtime>
  <lastupdatedate>0</lastupdatedate>
  <lastupdatetime>0</lastupdatetime>
  <allowfullexecute>0</allowfullexecute>
  <demoproject>0</demoproject>
  <fileversion>0</fileversion>
</Data>
</ProjectSettings>
<ActionItems>
<Data>
  <itemguid><![CDATA[1492C4AE-B9B9-4838-9113-F5BA6B104859]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[24F283AB-2E17-40FE-9939-D987B0E207E5]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>8</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1>%SOURCE_FOLDER%</value1>
  <value2></value2>
  <value3>c:\Dev\Prod\PowerToolbar</value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<XMLSet_Variable_Boundary>
<Data>
  <variablename>%SOURCE_FOLDER%</variablename>
  <operation>Assignment</operation>
  <operationid>0</operationid>
  <newvalue>c:\Dev\Prod\PowerToolbar</newvalue>
  <valuetype>0</valuetype>
  <incdecvalue>0</incdecvalue>
  <append>0</append>
</Data>
</XMLSet_Variable_Boundary>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[D789409E-F66D-45A7-AD24-4BBBA92BE508]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[24F283AB-2E17-40FE-9939-D987B0E207E5]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>9</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1>%SVN_URL%</value1>
  <value2></value2>
  <value3>svn://server/PowerToolbar</value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<XMLSet_Variable_Boundary>
<Data>
  <variablename>%SVN_URL%</variablename>
  <operation>Assignment</operation>
  <operationid>0</operationid>
  <newvalue>svn://server/PowerToolbar</newvalue>
  <valuetype>0</valuetype>
  <incdecvalue>0</incdecvalue>
  <append>0</append>
</Data>
</XMLSet_Variable_Boundary>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[98F518B3-549D-48AB-909E-A043192EEFAB]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[6416FE2E-F174-410E-847E-2C72C9373ABF]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>10</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1> and Wait for</value1>
  <value2>TortoiseProc.exe</value2>
  <value3>/command:update /path:"%SOURCE_FOLDER%\" /logmsg:"Update from Build Automator before build %MAJORVERSION%.%MINORVERSION%.%SUBVERSION% on %LONGDATE% at $NOW$"</value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<RunProgram>
<Data>
  <commandline>TortoiseProc.exe</commandline>
  <waitforprogram>1</waitforprogram>
  <parameters>/command:update /path:"%SOURCE_FOLDER%\" /logmsg:"Update from Build Automator before build %MAJORVERSION%.%MINORVERSION%.%SUBVERSION% on %LONGDATE% at $NOW$"</parameters>
  <startupfolder></startupfolder>
  <variablename></variablename>
  <runminimized>0</runminimized>
</Data>
</RunProgram>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[A9E690AC-BE27-4127-870E-2AD3BF01B807]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[6416FE2E-F174-410E-847E-2C72C9373ABF]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>11</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1> and Wait for</value1>
  <value2>TortoiseProc.exe</value2>
  <value3>/command:commit /path:"%SOURCE_FOLDER%\" /logmsg:"Commit from Build Automator before build %MAJORVERSION%.%MINORVERSION%.%SUBVERSION% on %LONGDATE% at $NOW$"</value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<RunProgram>
<Data>
  <commandline>TortoiseProc.exe</commandline>
  <waitforprogram>1</waitforprogram>
  <parameters>/command:commit /path:"%SOURCE_FOLDER%\" /logmsg:"Commit from Build Automator before build %MAJORVERSION%.%MINORVERSION%.%SUBVERSION% on %LONGDATE% at $NOW$"</parameters>
  <startupfolder></startupfolder>
  <variablename></variablename>
  <runminimized>0</runminimized>
</Data>
</RunProgram>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[481113F7-EAC3-4F1F-9093-4874CB9EB0F7]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[735D1BF0-BEC0-4867-A8E7-CA10C89E34F7]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>12</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1>%TEMP%\BuildAutomator\GetSVNRevisionNumber.txt</value1>
  <value2></value2>
  <value3></value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<WriteTextToFile>
<Data>
  <filetowriteto>%TEMP%\BuildAutomator\GetSVNRevisionNumber.txt</filetowriteto>
  <texttowrite>[Subversion]
Revision=</texttowrite>
  <whenfileexists>1</whenfileexists>
</Data>
</WriteTextToFile>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[C5DA04D9-5CEF-49F2-A404-49B808217349]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[735D1BF0-BEC0-4867-A8E7-CA10C89E34F7]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>13</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1>%TEMP%\BuildAutomator\GetSVNRevisionNumber.bat</value1>
  <value2></value2>
  <value3></value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<WriteTextToFile>
<Data>
  <filetowriteto>%TEMP%\BuildAutomator\GetSVNRevisionNumber.bat</filetowriteto>
  <texttowrite>REM:  http://svnbook.red-bean.com/en/1.7/svn.ref.svnversion.re.html
REM
svnversion "%SOURCE_FOLDER%" >> %TEMP%\BuildAutomator\GetSVNRevisionNumber.txt
</texttowrite>
  <whenfileexists>1</whenfileexists>
</Data>
</WriteTextToFile>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[72CC23C0-9C8B-4D75-9BED-2C2F1B921D62]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[6416FE2E-F174-410E-847E-2C72C9373ABF]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>14</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1> and Wait for</value1>
  <value2>%TEMP%\BuildAutomator\GetSVNRevisionNumber.bat</value2>
  <value3></value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<RunProgram>
<Data>
  <commandline>%TEMP%\BuildAutomator\GetSVNRevisionNumber.bat</commandline>
  <waitforprogram>1</waitforprogram>
  <parameters></parameters>
  <startupfolder></startupfolder>
  <variablename></variablename>
  <runminimized>1</runminimized>
</Data>
</RunProgram>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[DC44BBB8-C59F-4334-AF80-EAAA43C0DDAD]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[A145F1ED-B134-4922-974F-7ED512B5E9F3]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>15</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1>M</value1>
  <value2></value2>
  <value3></value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<XMLSearchReplaceInFiles_Boundary>
<Data>
  <searchfor>M</searchfor>
  <replacewith></replacewith>
  <casesensitive>0</casesensitive>
</Data>
</XMLSearchReplaceInFiles_Boundary>
<XMLSearchReplaceInFilesQueue_Boundary>
<Data>
  <linenumber>1</linenumber>
  <filename>%TEMP%\BuildAutomator\GetSVNRevisionNumber.txt</filename>
</Data>
</XMLSearchReplaceInFilesQueue_Boundary>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[3C1BD0CC-B650-4E7C-BB07-8422A6C7A2DA]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[24F283AB-2E17-40FE-9939-D987B0E207E5]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>16</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1>%BUILDNUMBER%</value1>
  <value2></value2>
  <value3>0</value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<XMLSet_Variable_Boundary>
<Data>
  <variablename>%BUILDNUMBER%</variablename>
  <operation>Assignment</operation>
  <operationid>0</operationid>
  <newvalue>0</newvalue>
  <valuetype>0</valuetype>
  <incdecvalue>1</incdecvalue>
  <append>0</append>
</Data>
</XMLSet_Variable_Boundary>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[3626D007-12A5-4AC9-900F-786381D3B352]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[4F91FE04-9843-4BC8-BB05-A43D2C81A497]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>17</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1>%BUILDNUMBER%</value1>
  <value2>Subversion</value2>
  <value3>Revision</value3>
  <value4>1</value4>
  <value5>%TEMP%\BuildAutomator\GetSVNRevisionNumber.txt</value5>
</Data>
</AutomatorInformation>
<GetFromINI>
<Data>
  <inifilename>%TEMP%\BuildAutomator\GetSVNRevisionNumber.txt</inifilename>
  <inisection>Subversion</inisection>
  <entry>Revision</entry>
  <defaultvalue>1</defaultvalue>
  <variablename>%BUILDNUMBER%</variablename>
</Data>
</GetFromINI>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[FDA52F58-A58B-4E04-92AD-55C92D8A2179]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[24F283AB-2E17-40FE-9939-D987B0E207E5]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>18</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1>%BN_HAS_MULTI%</value1>
  <value2>Expression</value2>
  <value3>( Instring(":","%BUILDNUMBER%",1,1) )</value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<XMLSet_Variable_Boundary>
<Data>
  <variablename>%BN_HAS_MULTI%</variablename>
  <operation>Evaluate Expression</operation>
  <operationid>5</operationid>
  <newvalue>Instring(":","%BUILDNUMBER%",1,1)</newvalue>
  <valuetype>0</valuetype>
  <incdecvalue>0</incdecvalue>
  <append>0</append>
</Data>
</XMLSet_Variable_Boundary>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[F0A7DFFA-54C5-45D0-818F-D0AD5ABFE147]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[24F283AB-2E17-40FE-9939-D987B0E207E5]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>19</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition><![CDATA[%BN_HAS_MULTI%>0]]></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1>%BUILDNUMBER%</value1>
  <value2>Expression</value2>
  <value3>( SUB("%BUILDNUMBER%",%BN_HAS_MULTI% + 1,LEN("%BUILDNUMBER%")) )</value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<XMLSet_Variable_Boundary>
<Data>
  <variablename>%BUILDNUMBER%</variablename>
  <operation>Evaluate Expression</operation>
  <operationid>5</operationid>
  <newvalue>SUB("%BUILDNUMBER%",%BN_HAS_MULTI% + 1,LEN("%BUILDNUMBER%"))</newvalue>
  <valuetype>0</valuetype>
  <incdecvalue>0</incdecvalue>
  <append>0</append>
</Data>
</XMLSet_Variable_Boundary>
</AutomatorAction>
]]></aidata>
</Data>
</ActionItems>
<Variables>
<Data>
  <vartype>0</vartype>
  <varname><![CDATA[%BN_HAS_MULTI%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[0]]></variablevalue>
  <lenvalue>1</lenvalue>
</Data>
<Data>
  <vartype>89</vartype>
  <varname><![CDATA[%BUILDNUMBER%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[89]]></variablevalue>
  <lenvalue>2</lenvalue>
</Data>
<Data>
  <vartype>0</vartype>
  <varname><![CDATA[%LONGDATE%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[May 19, 2013]]></variablevalue>
  <lenvalue>12</lenvalue>
</Data>
<Data>
  <vartype>2</vartype>
  <varname><![CDATA[%MAJORVERSION%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[2]]></variablevalue>
  <lenvalue>1</lenvalue>
</Data>
<Data>
  <vartype>1</vartype>
  <varname><![CDATA[%MINORVERSION%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[1]]></variablevalue>
  <lenvalue>1</lenvalue>
</Data>
<Data>
  <vartype>0</vartype>
  <varname><![CDATA[%SOURCE_FOLDER%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[c:\Dev\Prod\PowerToolbar]]></variablevalue>
  <lenvalue>24</lenvalue>
</Data>
<Data>
  <vartype>175</vartype>
  <varname><![CDATA[%SUBVERSION%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[175]]></variablevalue>
  <lenvalue>3</lenvalue>
</Data>
<Data>
  <vartype>0</vartype>
  <varname><![CDATA[%SVN_URL%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[svn://server/PowerToolbar]]></variablevalue>
  <lenvalue>25</lenvalue>
</Data>
<Data>
  <vartype>0</vartype>
  <varname><![CDATA[%TEMP%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[svn://server/PowerToolbar]]></variablevalue>
  <lenvalue>25</lenvalue>
</Data>
</Variables>
</AutomatorProject>

 

Below is another script that I use to copy into projects after I have compiled the build, created the install and got everything done.  It commits the project to the repository and then creates a tag with the latest build.

<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorProject >
<ProjectSettings>
<Data>
  <projectguid><![CDATA[C4DDCB67-7B44-4F4A-B196-02D6330A0AC5]]></projectguid>
  <projectname><![CDATA[POToolbar]]></projectname>
  <projectfolder><![CDATA[T:\Shared Documents\Build Automator Projects\PowerOffice\POToolbar.aprj]]></projectfolder>
  <createdate>0</createdate>
  <createtime>0</createtime>
  <lastupdatedate>0</lastupdatedate>
  <lastupdatetime>0</lastupdatetime>
  <allowfullexecute>0</allowfullexecute>
  <demoproject>0</demoproject>
  <fileversion>0</fileversion>
</Data>
</ProjectSettings>
<ActionItems>
<Data>
  <itemguid><![CDATA[81D35A4C-543B-4272-8F9F-DCABA39FC31F]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[6416FE2E-F174-410E-847E-2C72C9373ABF]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>5</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1> and Wait for</value1>
  <value2>TortoiseProc.exe</value2>
  <value3>/command:commit /path:"%SOURCE_FOLDER%" /logmsg:"Commit from Build Automator after build %MAJORVERSION%.%MINORVERSION%.%SUBVERSION%.%BUILDNUMBER% on %LONGDATE% at $NOW$"</value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<RunProgram>
<Data>
  <commandline>TortoiseProc.exe</commandline>
  <waitforprogram>1</waitforprogram>
  <parameters>/command:commit /path:"%SOURCE_FOLDER%" /logmsg:"Commit from Build Automator after build %MAJORVERSION%.%MINORVERSION%.%SUBVERSION%.%BUILDNUMBER% on %LONGDATE% at $NOW$"</parameters>
  <startupfolder></startupfolder>
  <variablename></variablename>
  <runminimized>0</runminimized>
</Data>
</RunProgram>
</AutomatorAction>
]]></aidata>
</Data>
<Data>
  <itemguid><![CDATA[7AC3C9C7-33D1-45EB-B209-27EA5C4CB11E]]></itemguid>
  <projectitemguid></projectitemguid>
  <actionguid><![CDATA[6416FE2E-F174-410E-847E-2C72C9373ABF]]></actionguid>
  <executeitem>1</executeitem>
  <linenumber>6</linenumber>
  <projectlinenumber>0</projectlinenumber>
  <condition></condition>
  <aidata><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<AutomatorAction >
<AutomatorInformation>
<Data>
  <value1> and Wait for</value1>
  <value2>TortoiseProc.exe</value2>
  <value3>/command:copy /path:"%SOURCE_FOLDER%" /url:"%SVN_URL%/Tags/%SHORTDATE%_Build_%MAJORVERSION%.%MINORVERSION%.%SUBVERSION%.%BUILDNUMBER%"" /logmsg:"Tag Created by Build Automator after build %MAJORVERSION%.%MINORVERSION%.%SUBVERSION%.%BUILDNUMBER% on %LONGDATE% at $NOW$"</value3>
  <value4></value4>
  <value5></value5>
</Data>
</AutomatorInformation>
<RunProgram>
<Data>
  <commandline>TortoiseProc.exe</commandline>
  <waitforprogram>1</waitforprogram>
  <parameters>/command:copy /path:"%SOURCE_FOLDER%" /url:"%SVN_URL%/Tags/%SHORTDATE%_Build_%MAJORVERSION%.%MINORVERSION%.%SUBVERSION%.%BUILDNUMBER%"" /logmsg:"Tag Created by Build Automator after build %MAJORVERSION%.%MINORVERSION%.%SUBVERSION%.%BUILDNUMBER% on %LONGDATE% at $NOW$"</parameters>
  <startupfolder></startupfolder>
  <variablename></variablename>
  <runminimized>0</runminimized>
</Data>
</RunProgram>
</AutomatorAction>
]]></aidata>
</Data>
</ActionItems>
<Variables>
<Data>
  <vartype>0</vartype>
  <varname><![CDATA[%BUILDNUMBER%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[0]]></variablevalue>
  <lenvalue>1</lenvalue>
</Data>
<Data>
  <vartype>0</vartype>
  <varname><![CDATA[%LONGDATE%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[June 29, 2012]]></variablevalue>
  <lenvalue>13</lenvalue>
</Data>
<Data>
  <vartype>2</vartype>
  <varname><![CDATA[%MAJORVERSION%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[2]]></variablevalue>
  <lenvalue>1</lenvalue>
</Data>
<Data>
  <vartype>0</vartype>
  <varname><![CDATA[%MINORVERSION%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[0]]></variablevalue>
  <lenvalue>1</lenvalue>
</Data>
<Data>
  <vartype>221</vartype>
  <varname><![CDATA[%SHORTDATE%]]></varname>
  <datatype><![CDATA[2013-05-1]]></datatype>
  <variablevalue><![CDATA[2013-05-14]]></variablevalue>
  <lenvalue>10</lenvalue>
</Data>
<Data>
  <vartype>0</vartype>
  <varname><![CDATA[%SOURCE_FOLDER%]]></varname>
  <datatype><![CDATA[c:\Dev\Pr]]></datatype>
  <variablevalue><![CDATA[XXXXX]]></variablevalue>
  <lenvalue>21</lenvalue>
</Data>
<Data>
  <vartype>166</vartype>
  <varname><![CDATA[%SUBVERSION%]]></varname>
  <datatype><![CDATA[String]]></datatype>
  <variablevalue><![CDATA[166]]></variablevalue>
  <lenvalue>3</lenvalue>
</Data>
<Data>
  <vartype>0</vartype>
  <varname><![CDATA[%SVN_URL%]]></varname>
  <datatype></datatype>
  <variablevalue></variablevalue>
  <lenvalue>0</lenvalue>
</Data>
</Variables>
</AutomatorProject>

All you need to do to use those snippets is to copy them from this page and save them to file.  Depending on the font size in your browser some of the code may wrap, but I don't think it should affect the text when you copy it into Build Automator.  Some reformatting may also occur when you paste it into your xml document, depending on your editor.  I start by creating a XML file in my editor, then copy the copied snippet in there and save it.

Arnor Baldvinsson

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk