From a22b1774032e66ddf7e59ba5f4b82f5b7d476c35 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Mon, 8 May 2017 13:49:09 -0700 Subject: [PATCH] Update release script for MSBuild --- dev-bin/release.ps1 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dev-bin/release.ps1 b/dev-bin/release.ps1 index bc1260e..7e0c238 100644 --- a/dev-bin/release.ps1 +++ b/dev-bin/release.ps1 @@ -1,7 +1,7 @@ $ErrorActionPreference = 'Stop' $DebugPreference = 'Continue' -$projectJsonFile=(Get-Item "MaxMind.Db/project.json").FullName +$projectFile=(Get-Item "MaxMind.Db\MaxMind.Db.csproj").FullName $matches = (Get-Content -Encoding UTF8 releasenotes.md) ` | Select-String '(\d+\.\d+\.\d+(?:-\w+)?) \((\d{4}-\d{2}-\d{2})\)' ` @@ -19,11 +19,9 @@ if (& git status --porcelain) { Write-Error '. is not clean' } -# Not using Powershell's built-in JSON support as that -# reformats the file. -(Get-Content -Encoding UTF8 $projectJsonFile) ` - -replace '(?<=version"\s*:\s*")[^"]+', $version ` | - Out-File -Encoding UTF8 $projectJsonFile +(Get-Content -Encoding UTF8 $projectFile) ` + -replace '(?<=)[^<]+', $version ` | + Out-File -Encoding UTF8 $projectFile & git diff