MSBuild svn xml日志导出

时间:2014-02-28 17:42:32

标签: svn msbuild

我有这个MSBuild文件,它压缩我的javascript,css并更改版本号以匹配SVN版本号:

  <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 XML日志文件,以便创建发行说明。

我有svn命令:svn log --xml

1 个答案:

答案 0 :(得分:0)

我添加了

<Exec Command="svn log ..\properties\assemblyinfo.cs --xml > ..\releasenotes.xml"/>
似乎要做的伎俩。