rnauman
07-16-2013, 12:52 PM
I've created a powershell task and checked the script radio with this script:
$matches = Select-String %PROCFILES_FULLPATH% -Pattern '(?<!cfg)\.DEBUG' -CaseSensitive
$matchCount = 0
if ($matches -is [system.array]) {
$matchCount = $matches.Count
} else {
$matchCount = $matches.Matches.Count
}
if ($matchCount -gt 0) {
"##teamcity[message text='Warning! " + $matchCount + " matches of non `cfg.` prefixed DEBUG statements were found! This could result in minified build errors' status='WARNING']"
}
I get the following error when running this task:
Error expanding macros or script in property CmdStr: $matches = Select-String D:\TruCode_JSBuild\repository\Source\TruCode.Web.U I.Controls\js\controls\codebooks\views\tabular.ts -Pattern '(?<!cfg)\.DEBUG' -CaseSensitive
$matchCount = 0
if ($matches -is <Error at Line 1, Column 1 (Object required: 'system')>) {
And here's the powershell version:
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
$matches = Select-String %PROCFILES_FULLPATH% -Pattern '(?<!cfg)\.DEBUG' -CaseSensitive
$matchCount = 0
if ($matches -is [system.array]) {
$matchCount = $matches.Count
} else {
$matchCount = $matches.Matches.Count
}
if ($matchCount -gt 0) {
"##teamcity[message text='Warning! " + $matchCount + " matches of non `cfg.` prefixed DEBUG statements were found! This could result in minified build errors' status='WARNING']"
}
I get the following error when running this task:
Error expanding macros or script in property CmdStr: $matches = Select-String D:\TruCode_JSBuild\repository\Source\TruCode.Web.U I.Controls\js\controls\codebooks\views\tabular.ts -Pattern '(?<!cfg)\.DEBUG' -CaseSensitive
$matchCount = 0
if ($matches -is <Error at Line 1, Column 1 (Object required: 'system')>) {
And here's the powershell version:
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1