forked from chtof/chocolatey-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5811f8c
commit 57aa601
Showing
3 changed files
with
75 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#Name can be 'random N' to randomly force the Nth group of packages. | ||
|
||
param( [string[]] $Name, [string] $Root = "$PSScriptRoot" ) | ||
|
||
if (Test-Path $PSScriptRoot/update_vars.ps1) { . $PSScriptRoot/update_vars.ps1 } | ||
$global:au_root = Resolve-Path $Root | ||
|
||
if (($Name.Length -gt 0) -and ($Name[0] -match '^random (.+)')) { | ||
[array] $lsau = lsau | ||
|
||
$group = [int]$Matches[1] | ||
$n = (Get-Random -Maximum $group) | ||
Write-Host "TESTING GROUP $($n+1) of $group" | ||
|
||
$group_size = [int]($lsau.Count / $group) + 1 | ||
$Name = $lsau | select -First $group_size -Skip ($group_size*$n) | % { $_.Name } | ||
|
||
Write-Host ($Name -join ' ') | ||
Write-Host ('-'*80) | ||
} | ||
|
||
$options = [ordered]@{ | ||
Force = $true | ||
Push = $false | ||
|
||
Report = @{ | ||
Type = 'markdown' #Report type: markdown or text | ||
Path = "$PSScriptRoot\Update-Force-Test-${n}.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 | ||
Title = "Update Force Test - Group ${n}" | ||
UserMessage = "[Update report](https://gist.github.com/$Env:gist_id) | **USING AU NEXT VERSION**" # Markdown, Text: Custom user message to show | ||
} | ||
} | ||
|
||
Gist = @{ | ||
Id = $Env:gist_id_test #Your gist id; leave empty for new private or anonymous gist | ||
ApiKey = $Env:github_api_key #Your github api key - if empty anoymous gist is created | ||
Path = "$PSScriptRoot\Update-Force-Test-${n}.md" #List of files to add to the gist | ||
Description = "Update Force Test Report #powershell #chocolatey" | ||
} | ||
} | ||
|
||
|
||
$global:info = updateall -Name $Name -Options $Options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters