Skip to content

Commit

Permalink
Merge pull request majkinetor#144 from RedBaron2/patch-1
Browse files Browse the repository at this point in the history
Add au_NoCheckChocoUrl option in updateall
  • Loading branch information
majkinetor authored May 15, 2018
2 parents def6c51 + da5990d commit 1236927
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions AU/Public/Update-AUPackages.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Author: Miodrag Milic <[email protected]>
# Last Change: 02-Dec-2016.

# Author: Miodrag Milic <[email protected]>
# Last Change: 08-May-2018


<#
.SYNOPSIS
Update all automatic packages
Expand Down Expand Up @@ -50,6 +52,7 @@ function Update-AUPackages {
PushAll - Set to true to push all updated packages and not only the most recent one per folder.
WhatIf - Set to true to set WhatIf option for all packages.
PluginPath - Additional path to look for user plugins. If not set only module integrated plugins will work
NoCheckChocoVersion - Set to true to set NoCheckChocoVersion option for all packages.
Plugin - Any HashTable key will be treated as plugin with the same name as the option name.
A script with that name will be searched for in the AU module path and user specified path.
Expand Down Expand Up @@ -82,6 +85,7 @@ function Update-AUPackages {
if (!$Options.Force) { $Options.Force = $false }
if (!$Options.Push) { $Options.Push = $false }
if (!$Options.PluginPath) { $Options.PluginPath = '' }
if (!$Options.NoCheckChocoVersion){ $Options.NoCheckChocoVersion = $false }

Remove-Job * -force #remove any previously run jobs

Expand All @@ -92,6 +96,7 @@ function Update-AUPackages {
$aup = Get-AUPackages $Name
Write-Host 'Updating' $aup.Length 'automatic packages at' $($startTime.ToString("s") -replace 'T',' ') $(if ($Options.Force) { "(forced)" } else {})
Write-Host 'Push is' $( if ($Options.Push) { 'enabled' } else { 'disabled' } )
Write-Host 'NoCheckChocoVersion is' $( if ($Options.NoCheckChocoVersion) { 'enabled' } else { 'disabled' } )
if ($Options.Force) { Write-Host 'FORCE IS ENABLED. All packages will be updated' }

$script_err = 0
Expand Down Expand Up @@ -175,6 +180,7 @@ function Update-AUPackages {
$global:au_Force = $Options.Force
$global:au_WhatIf = $Options.WhatIf
$global:au_Result = 'pkg'
$global:au_NoCheckChocoVersion = $Options.NoCheckChocoVersion

if ($Options.BeforeEach) {
$s = [Scriptblock]::Create( $Options.BeforeEach )
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
- `Gist` plugin: Security protocol is set according to updated [Github requirements](https://githubengineering.com/crypto-removal-notice).
- `Get-RemoteFiles`: Fixed wrong checksum type being set on 64bit url

## 2018.5.81
- `Update-AuPackage`
- Added NoCheckChocoVersion as a switch for not checking http://chocolatey.org version.

## 2018.1.11
- `Update-AuPackage`
- New feature [streams](https://github.com/majkinetor/au#streams) that extends `au_GetLatest` with option to return multiple HashTables (one for each stream).
Expand Down

0 comments on commit 1236927

Please sign in to comment.