add coverage things

This commit is contained in:
Tommy Parnell
2016-11-08 21:59:33 -05:00
parent 754d7cbff4
commit 1cbd7873e1
9 changed files with 68 additions and 12 deletions

View File

@@ -1,8 +1,16 @@
Get-ChildItem -Path $ENV:APPVEYOR_BUILD_FOLDER -Recurse File -Filter project.json | foreach {
$jsonFile = Get-Content $_.FullName -raw | ConvertFrom-Json
if($jsonFile.version)
{
$jsonFile.version = $ENV:APPVEYOR_BUILD_VERSION
$jsonFile | ConvertTo-Json -Depth 999 | Out-File $_.FullName
}
}
$projectJsonFileLocation = "src/UriBuilder.Fluent/project.json"
$newVersion = $env:APPVEYOR_REPO_TAG_NAME
if($newVersion -eq $null)
{
$newVersion = "1.0.0-${env:APPVEYOR_BUILD_VERSION}"
}
if($newVersion -eq $null)
{
return
}
Write-Host "$projectJsonFileLocation will be update with new version '$newVersion'"
$json = (Get-Content $projectJsonFileLocation -Raw) | ConvertFrom-Json
$json.version = $newVersion
$json | ConvertTo-Json -depth 100 | Out-File $projectJsonFileLocation