<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:pc="Processing.Command" xmlns:assign="Processing.Command.Assign">
<pc:terminate test="not(wrights:HasAdminRole())"
msg="{concat('Admin role is required. Available roles:', wrights:Roles())}"/>
<pc:assign-default workingdir="{directories:Get()}"/>
<!-- Extract registry data -->
<pc:assign-nodeset reg="{files:XmlFile('../registry.xml')}"/>
<pc:assign
installdir="{$reg//Computer[@name=environment:MachineName()]//Installation/@installdir}"/>
<pc:assign sourcedir="{$workingdir}" destdir="{path:Combine($installdir, 'app')}"/>
<!-- Deploy new or changed flatfiles -->
<pc:assign-nodeset
myfilteredlist="{directories:DirectoryContent($workingdir, '*.*', '1', '', '')}"/>
<pc:each using="directories:DirectoryContent($workingdir, '*.*', '1', '', '')"
select="Directory/File[not(@filename='deploy.xml')]" assign:result="@filename">
<pc:CopyFileOverwrite source="{path:Combine($sourcedir,$result)}"
destination="{path:Combine($destdir,$result)}"/>
</pc:each>
<!-- Restart rulesservices -->
<pc:each using="$reg" select="//Computer[@name=environment:MachineName()]"
assign:rulesservices="//RulesService">
<pc:each select="$rulesservices" assign:servicename="@winServiceName">
<pc:ServiceStop servicename="{$servicename}"/>
<pc:ServiceStart servicename="{$servicename}"/>
</pc:each>
</pc:each>
</root>
|