Forced packages for updateall and AV

This commit is contained in:
Miodrag Milic
2016-10-22 08:31:07 +02:00
parent 7cfd79a8da
commit 5433c6ef2b
2 changed files with 30 additions and 14 deletions
+10 -1
View File
@@ -69,7 +69,14 @@ install:
build_script:
- ps: |
./update_all.ps1
if ( ($Env:APPVEYOR_REPO_COMMIT_MESSAGE -match '\[AU (.+?)\]') -and
($Env:APPVEYOR_SCHEDULED_BUILD -ne 'true') -and
($Env:APPVEYOR_FORCED_BUILD -ne 'true')
) { $forced = $Matches[1] }
./update_all.ps1 -Name * -ForcedPackages $forced
7z a au_temp.zip $Env:TEMP\chocolatey\au\*
#on_finish:
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
@@ -77,6 +84,8 @@ build_script:
artifacts:
- path: update_info.xml
- path: Update-AUPackages.md
- path: au_temp.zip
notifications:
- provider: Email
+20 -13
View File
@@ -1,6 +1,6 @@
# AU Packages Template: https://github.com/majkinetor/au-packages-template
param($Name = $null)
param($Name = $null, [string] $ForcedPackages)
if (Test-Path $PSScriptRoot/update_vars.ps1) { . $PSScriptRoot/update_vars.ps1 }
@@ -12,7 +12,7 @@ $Options = [ordered]@{
Report = @{
Type = 'markdown' #Report type: markdown or text
Path = "$PSScriptRoot\Update-AUPacakges.md" #Path where to save the report
Path = "$PSScriptRoot\Update-AUPackages.md" #Path where to save the report
Params= @{ #Report parameters:
Github_UserRepo = $Env:github_user_repo # Markdown: shows user info in upper right corner
NoAppVeyor = $false # Markdown: do not show AppVeyor build shield
@@ -21,9 +21,9 @@ $Options = [ordered]@{
}
Gist = @{
Id = $Env:gist_id #Your gist id or leave empty for anonymous
ApiKey = $Env:github_api_key #Your github api key
Path = "$PSScriptRoot\Update-AUPacakges.md" #List of files to add to gist
Id = $Env:gist_id #Your gist id or leave empty for anonymous
ApiKey = $Env:github_api_key #Your github api key
Path = "$PSScriptRoot\Update-AUPackages.md" #List of files to add to gist
}
#Git = @{
@@ -38,20 +38,27 @@ $Options = [ordered]@{
Mail = if ($Env:mail_user) {
@{
To = $Env:mail_user
Server = $Env:mail_server
UserName = $Env:mail_user
Password = $Env:mail_pass
Port = $Env:mail_port
EnableSsl = $Env:mail_enable_ssl -eq 'true'
Attachments = "$PSScriptRoot\update_info.xml"
To = $Env:mail_user
Server = $Env:mail_server
UserName = $Env:mail_user
Password = $Env:mail_pass
Port = $Env:mail_port
EnableSsl = $Env:mail_enablessl -eq 'true'
Attachment = "$PSScriptRoot\update_info.xml"
UserMessage = ''
SendAlways = $false #Send notifications every time
}
} else {}
ForcedPackages = $ForcedPackages -split ' '
BeforeEach = {
param($PackageName, $Options )
if ($Options.ForcedPackages -contains $PackageName) { $global:au_Force = $true }
}
}
$global:au_Root = "$PSScriptRoot" #Path to the AU packages
if ($ForcedPackages) { Write-Host "FORCED PACKAGES: $ForcedPackages" }
$au_Root = $PSScriptRoot #Path to the AU packages
$info = updateall -Name $Name -Options $Options
#Uncomment to fail the build on AppVeyor on any package error