Skip to content

Commit

Permalink
Update release script for MSBuild
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed May 8, 2017
1 parent 5dbf41e commit a22b177
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dev-bin/release.ps1
Original file line number Diff line number Diff line change
@@ -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})\)' `

Expand All @@ -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 '(?<=<VersionPrefix>)[^<]+', $version ` |
Out-File -Encoding UTF8 $projectFile


& git diff
Expand Down

0 comments on commit a22b177

Please sign in to comment.