/CCNetPlugins/VersionFileWriter.cs

https://github.com/RickyLin/DotNetUtilities · C# · 22 lines · 20 code · 2 blank · 0 comment · 0 complexity · adb578808c0870c9315e0e28e71d8c9c MD5 · raw file

  1. using Exortech.NetReflector;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using ThoughtWorks.CruiseControl.Core;
  7. using System.IO;
  8. namespace CCNetPlugins
  9. {
  10. [ReflectorType("versionWriterTask")]
  11. public class VersionFileWriter : ITask
  12. {
  13. [ReflectorProperty("versionFilePath")]
  14. public string VersionFilePath { get; set; }
  15. public void Run(IIntegrationResult result)
  16. {
  17. File.WriteAllText(VersionFilePath, result.Label);
  18. }
  19. }
  20. }