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-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 165a12d + 8c8977e commit 808beef
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 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.ServiceStack/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 Expand Up @@ -194,4 +191,4 @@ Task("Mono")

///////////////////////////////////////////////////////////////

RunTarget(target);
RunTarget(target);

0 comments on commit 808beef

Please sign in to comment.