未验证 提交 368dcfb2 编写于 作者: D Don Syme 提交者: GitHub

don't rebuild (#4230)

上级 a8115c15
......@@ -113,15 +113,19 @@ open System.Reflection"
let sb = StringBuilder().AppendLine(boilerplate).AppendLine()
let code = Array.fold (fun (sb:StringBuilder) (item:ITaskItem) -> sb.AppendLine(WriteCodeFragment.GenerateAttribute item)) sb _assemblyAttributes
code.AppendLine().AppendLine("do()") |> ignore
let fileName = _outputFile.ItemSpec
let outputFileItem =
if not (isNull _outputFile) && not (isNull _outputDirectory) && not (Path.IsPathRooted(_outputFile.ItemSpec)) then
TaskItem(Path.Combine(_outputDirectory.ItemSpec, _outputFile.ItemSpec)) :> ITaskItem
if not (isNull _outputFile) && not (isNull _outputDirectory) && not (Path.IsPathRooted(fileName)) then
TaskItem(Path.Combine(_outputDirectory.ItemSpec, fileName)) :> ITaskItem
elif isNull _outputFile then
let tempFile = Path.Combine(Path.GetTempPath(), sprintf "tmp%s.fs" (Guid.NewGuid().ToString("N")))
TaskItem(tempFile) :> ITaskItem
else
_outputFile
File.WriteAllText(_outputFile.ItemSpec, code.ToString())
let codeText = code.ToString()
let alreadyExists = (try File.Exists fileName && File.ReadAllText(fileName) = codeText with _ -> false)
if not alreadyExists then
File.WriteAllText(fileName, codeText)
_outputFile <- outputFileItem
true
with e ->
......
......@@ -131,4 +131,3 @@ https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-t
https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-to-us 87dafbc17b494c438b6db9e59e064736bd8a44e2 ba63403cb5898596c5e875a14ce22b33ef618c01 221.58 11.19 31.91 48.23 66.05 52.99
https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-to-us 87dafbc17b494c438b6db9e59e064736bd8a44e2 458e6c29d7e059a5a8a7b4cd7858c7d633fb5906 224.75 11.20 31.09 46.96 63.08 53.08
https://github.com/manofstick/visualfsharp.git all-your-collections-are-belong-to-us 87dafbc17b494c438b6db9e59e064736bd8a44e2 7e1fd6ac330f86597f3167e8067cfd805a89eec9 235.48 10.83 33.47 47.17 65.56 52.50
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册