add coverage things
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user