diff --git a/.appveyor.yml b/.appveyor.yml index 690477a99..814662cd7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,5 +1,6 @@ version: '{build}' max_jobs: 1 +image: Visual Studio 2022 # History plugin requires complete log #clone_depth: 5 branches: @@ -41,12 +42,31 @@ environment: api_key: secure: YOUR_CHOCO_API_KEY_HERE_ENCRYPTED_STRING # https://ci.appveyor.com/tools/encrypt + #Chocolatey version we want to use when checking for updates (usually latest). + choco_version: '2.2.2' + nupkg_cache_path: C:\packages + init: - git config --global user.email "chocolatey@realdimensions.net" -- git config --global user.name "Chocolatey" +- git config --global user.name "Chocolatey-AU" - git config --global core.safecrlf false install: +- ps: | + $chocoVersion = $Env:choco_version + if (!(Test-Path "$env:nupkg_cache_path")) { mkdir -Force "$env:nupkg_cache_path" } + @{ + 'chocolatey' = $chocoVersion +# Uncomment and input the version if you are using any of these in AU scripts +# 'wormies-au-helpers' = 'VERSION_HERE' +# 'chocolatey-core.extension' = 'VERSION_HERE' +# 'autohotkey.install' = 'VERSION_HERE' + }.GetEnumerator() | % { + if (!(Test-Path "${env:nupkg_cache_path}\$($_.Key).$($_.Value).nupkg")) { rm "${env:nupkg_cache_path}\$($_.Key).*.nupkg" ; iwr "https://chocolatey.org/api/v2/package/$($_.Key)/$($_.Value)" -OutFile "${env:nupkg_cache_path}\$($_.Key).$($_.Value).nupkg" } + if ($_.Key -eq 'chocolatey') { choco upgrade $_.Key --version $_.Value --source ${env:nupkg_cache_path} --allow-downgrade --pre } + else { choco install $_.Key --version $_.Value --source ${env:nupkg_cache_path} --ignore-dependencies } + } + rm "$env:ChocolateyInstall\logs\*.log" - ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version' - ps: $PSVersionTable - git --version @@ -60,9 +80,6 @@ install: ' {0,-20} {1}' -f 'SCHEDULED BUILD:', ($Env:APPVEYOR_SCHEDULED_BUILD -eq 'true') ' {0,-20} {1}' -f 'FORCED BUILD:' , ($Env:APPVEYOR_FORCED_BUILD -eq 'true') ' {0,-20} {1}' -f 'RE BUILD:' , ($Env:APPVEYOR_RE_BUILD -eq 'true') - -# Uncomment the below line if you are using any of the functions from chocolatey-core.extension - https://chocolatey.org/packages/chocolatey-core.extension. Ensure you also have it listed in your package's dependencies -# - cinst chocolatey-core.extension build_script: - ps: | @@ -107,5 +124,8 @@ notifications: on_build_failure: true on_build_status_changed: true +cache: + - '%nupkg_cache_path% -> .appveyor.yml' + #on_finish: #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) \ No newline at end of file diff --git a/update_all.ps1 b/update_all.ps1 index 2de96441b..528099270 100644 --- a/update_all.ps1 +++ b/update_all.ps1 @@ -17,6 +17,11 @@ $Options = [ordered]@{ 'The operation has timed out' 'Internal Server Error' 'Service Temporarily Unavailable' + 'The connection was closed unexpectedly.' + 'package version already exists' + 'already exists on a Simple OData Server' # https://github.com/chocolatey/chocolatey.org/issues/613 + 'Conflict' + 'A system shutdown has already been scheduled' # https://gist.github.com/choco-bot/a14b1e5bfaf70839b338eb1ab7f8226f#wps-office-free ) RepeatOn = @( #Error message parts on which to repeat package updater 'Could not create SSL/TLS secure channel' # https://github.com/chocolatey/chocolatey-coreteampackages/issues/718 @@ -28,6 +33,7 @@ $Options = [ordered]@{ 'Internal Server Error' 'An exception occurred during a WebClient request' 'remote session failed with an unexpected state' + 'The connection was closed unexpectedly.' ) #RepeatSleep = 250 #How much to sleep between repeats in seconds, by default 0 #RepeatCount = 2 #How many times to repeat on errors, by default 1