Skip to content

Instantly share code, notes, and snippets.

View GrimaceOfDespair's full-sized avatar

Grimace of Despair GrimaceOfDespair

View GitHub Profile
@piers7
piers7 / Load-TeamCityProperties.ps1
Created September 4, 2013 05:12
Load TeamCity system properties into PowerShell variable scope
<#
.Synopsis
Loads TeamCity system build properties into the current scope
Unless forced, doesn't do anything if not running under TeamCity
#>
param(
$prefix = 'TeamCity.',
$file = $env:TEAMCITY_BUILD_PROPERTIES_FILE + ".xml",
[switch] $inTeamCity = (![String]::IsNullOrEmpty($env:TEAMCITY_VERSION))
)