Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created April 25, 2016 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/e4355510c15aa8a9c0c9339bfb05b415 to your computer and use it in GitHub Desktop.
Save justinyoo/e4355510c15aa8a9c0c9339bfb05b415 to your computer and use it in GitHub Desktop.
Azure DevOps Series
$BuildNumber = 10
foreach ($project in $projects)
{
$path = $project.FullName
$projectJson = Get-Content -Raw -Path $path\project.json | ConvertFrom-Json
$version = $projectJson.version -replace "\.0$", ".$BuildNumber"
$projectJson.version = $version
ConvertTo-Json $projectJson -Depth 999 | Out-File $path\project.json
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment