Skip to content

Commit

Permalink
Updated build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Sep 25, 2017
1 parent 136b455 commit 690ad25
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Build/Start-Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
if (Get-NetAdapter | Where-Object Status -ieq 'Up') {
# Install dependencies
Get-PackageProvider -Name NuGet -ForceBootstrap | Out-Null
@('psake', 'PSDeploy', 'BuildHelpers', 'Pester', 'platyps', 'PSScriptAnalyzer', 'PSCoverage', 'CICD'<#, 'PSGitHub'#>) | ForEach-Object {
@('psake', 'PSDeploy', 'BuildHelpers', 'Pester', 'platyps', 'PSScriptAnalyzer', 'PSCoverage', 'CICD', 'PSGitHub') | ForEach-Object {
if (-Not (Get-Module -ListAvailable -Name $_)) {
"Installing module $_"
Install-Module -Name $_ -Scope CurrentUser -AllowClobber -Force
Expand Down
4 changes: 2 additions & 2 deletions Build/deploy.psdeploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ if (

"Creating release in GitHub repository" |
Write-Host
$GitHubReleaseId = New-GitHubRelease -Owner $env:GitHubOwner -Repository $env:GitHubRepo -Token $env:GitHubToken -Name $env:ModuleVersion -Branch $env:BHBranchName -Body $ReleaseNotes
$GitHubReleaseId = CICD\New-GitHubRelease -Owner $env:GitHubOwner -Repository $env:GitHubRepo -Token $env:GitHubToken -Name $env:ModuleVersion -Branch $env:BHBranchName -Body $ReleaseNotes

"Uploading asset to GitHub release" |
Write-Host
$GitHubAssetId = New-GitHubReleaseAsset -Owner $env:GitHubOwner -Repository $env:GitHubRepo -Token $env:GitHubToken -Release $GitHubReleaseId -Path $AssetPath
$GitHubAssetId = CICD\New-GitHubReleaseAsset -Owner $env:GitHubOwner -Repository $env:GitHubRepo -Token $env:GitHubToken -Release $GitHubReleaseId -Path $AssetPath
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions Build/psake.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ Task Analysis -Depends Init {
return
}

$Files = Get-ChildItem -Path "$env:BHModulePath\*.ps1" -File
$results = $Files | ForEach-Object { Invoke-ScriptAnalyzer -Path $_ -Severity Warning }
$results = Invoke-ScriptAnalyzer -Path $env:BHModulePath -Severity Error,Warning -Recurse
if ($results) {
$results | Select-Object -Property ScriptName,Line,RuleName,Severity,Message
Write-Error 'Failed script analysis. Build failed.'
}
$results = $Files | ForEach-Object { Invoke-ScriptAnalyzer -Path $_ -SuppressedOnly }

$results = Invoke-ScriptAnalyzer -Path $env:BHModulePath -SuppressedOnly -Recurse
if ($results) {
$results | Select-Object -Property ScriptName,Line,RuleName,Severity,Message,Justification
Write-Warning 'Some issues are suppressed from script analysis.'
Expand Down

0 comments on commit 690ad25

Please sign in to comment.