2014-02-28 33 views
0

我有這樣的MSBuild文件,壓縮我的JavaScript,CSS和改變的版本號相匹配的SVN版本號:我如何改變這種獲得一個SVN XML日誌的MSBuild SVN XML日誌導出

<UsingTask TaskName="CssCompressorTask" AssemblyFile="..\..\_Shared\YuiCompressor-2.3.0.0\Yahoo.Yui.Compressor.Build.MsBuild.dll" /> 
    <UsingTask TaskName="JavaScriptCompressorTask" AssemblyFile="..\..\_Shared\YuiCompressor-2.3.0.0\Yahoo.Yui.Compressor.Build.MsBuild.dll" /> 
    <Import Project="$(MSBuildProjectDirectory)\..\..\_Shared\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" /> 

    <Target Name="Minify" Condition="'$(ConfigurationName)' == 'Release'"> 

    <!-- css and js compression using yui --> 
    <ItemGroup> 
     <CssFiles Include="$(SourceLocation)../content/*.css" Exclude="../content/*.min.css" /> 
     <JavaScriptFiles Include="$(SourceLocation)../scripts/*.js" Exclude="../*.min.js" /> 
    </ItemGroup> 

    <CssCompressorTask 
     SourceFiles="%(CssFiles.Identity)" 
     DeleteSourceFiles="false" 
     OutputFile="%(CssFiles.RelativeDir)%(CssFiles.Filename).min.css" 
     CompressionType="Standard" 
     LoggingType="Info" 
     PreserveComments="false" 
     LineBreakPosition="-1" 
     /> 

    <JavaScriptCompressorTask 
     SourceFiles="%(JavaScriptFiles.Identity)" 
     DeleteSourceFiles="false" 
     OutputFile="%(JavaScriptFiles.RelativeDir)\min\%(JavaScriptFiles.Filename).min.js" 
     CompressionType="Standard" 
     ObfuscateJavaScript="True" 
     PreserveAllSemicolons="False" 
     DisableOptimizations="No" 
     EncodingType="Default" 
     LineBreakPosition="-1" 
     LoggingType="Info" 
     ThreadCulture="en-gb" 
     IsEvalIgnored="false" 
     /> 

    <!-- version numbering from subversion --> 
    <SvnVersion LocalPath="$(MSBuildProjectDirectory)" ToolPath="C:\Program Files\TortoiseSVN\bin"> 
     <Output TaskParameter="Revision" PropertyName="Revision" /> 
    </SvnVersion> 

    <FileUpdate Files="..\Properties\AssemblyInfo.cs" 
       Regex="(\d+)\.(\d+)\.(\d+)\.(.+)" 
       ReplacementText="$1.$2.$(Revision).$4" /> 

    </Target> 

文件生成以及我可以創建發行說明。

我有SVN命令:SVN登錄--xml

+0

你不需要最後一個「發佈」的基礎版本嗎?上次提交的日誌可能不會涵蓋所有更改。 –

回答

0

我添加

<Exec Command="svn log ..\properties\assemblyinfo.cs --xml > ..\releasenotes.xml"/> 

似乎這樣的伎倆。