Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #20 from NancyFx/jchannon-patch-1
Browse files Browse the repository at this point in the history
Removed json.net cake dependency
  • Loading branch information
grumpydev committed Jul 11, 2016
2 parents 4bbbb47 + e7c6195 commit 3e629a7
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions build.cake
@@ -1,5 +1,3 @@
#addin "nuget:?package=Newtonsoft.Json&version=8.0.3"

// Usings
using System.Xml;
using System.Xml.Linq;
Expand Down Expand Up @@ -48,12 +46,11 @@ Task("Update-Version")
}
var file = new FilePath("src/Nancy.Serialization.ProtoBuf/project.json");
var project = Newtonsoft.Json.Linq.JObject.Parse(
System.IO.File.ReadAllText(file.FullPath, Encoding.UTF8));
project["version"].Replace(version);
System.IO.File.WriteAllText(file.FullPath, project.ToString(), Encoding.UTF8);
var project = System.IO.File.ReadAllText(file.FullPath, Encoding.UTF8);
project = System.Text.RegularExpressions.Regex.Replace(project, "(\"version\":\\s*)\".+\"", "$1\"" + version + "\"");
System.IO.File.WriteAllText(file.FullPath, project, Encoding.UTF8);
});


Expand Down

0 comments on commit 3e629a7

Please sign in to comment.