Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 71d0984

Browse files
committed
2 parents be8fed1 + 62307b5 commit 71d0984

11 files changed

+429
-196
lines changed

.github/EventLogs.ps1

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#require -version 3.0
2+
3+
<#
4+
.SYNOPSIS
5+
Clear all event logs
6+
#>
7+
function Clear-EventLogs {
8+
Get-EventLog * | ForEach-Object {
9+
try {
10+
Clear-EventLog $_.Log
11+
}
12+
catch {
13+
Write-Warning 'Error during clearing event logs'
14+
Write-Warning "$_"
15+
}
16+
}
17+
18+
#Clear this one again as it accumulates clearing events from previous step
19+
try {
20+
Clear-EventLog System
21+
}
22+
catch {
23+
Write-Warning 'Error during clearing event logs'
24+
Write-Warning "$_"
25+
}
26+
Get-EventLog *
27+
}
28+
29+
<#
30+
.SYNOPSIS
31+
Get latest event logs across all event logs
32+
.Example
33+
logs Error,Warning -Newest 5
34+
#>
35+
function Get-EventLogs {
36+
param(
37+
[ValidateSet('Error', 'Information', 'Warning', '*')]
38+
[string[]] $EntryType = 'Error',
39+
40+
[int] $Newest = 1000,
41+
42+
[switch] $Raw
43+
)
44+
$r = @()
45+
46+
if ($EntryType -eq '*') { $EntryType = 'Error', 'Information', 'Warning' }
47+
Get-EventLog * | ForEach-Object Log | ForEach-Object {
48+
$log = $_
49+
try {
50+
$r += Get-EventLog -Log $log -Newest $Newest -EntryType $EntryType -ea 0
51+
}
52+
catch { Write-Warning "$log - $_" }
53+
}
54+
$r = $r | Sort-Object TimeWritten -Descending
55+
if ($Raw) { $r } else { $r | Select-Object Source, TimeWritten, Message }
56+
}
57+
58+
Set-Alias logs Get-EventLogs
59+
Set-Alias clearlogs Clear-EventLogs

.github/FUNDING.yml

Whitespace-only changes.

.github/workflows/package-pusher.yml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Package Pusher
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
packages:
7+
description: "What is the packages you wish to push?"
8+
required: true
9+
10+
jobs:
11+
pusher:
12+
runs-on: windows-2019
13+
env:
14+
au_version: master
15+
github_user_repo: ${{ github.repository }}
16+
api_key: ${{ secrets.CHOCO_API_KEY }}
17+
18+
steps:
19+
- name: Install Dependencies
20+
run: |
21+
Set-Service wuauserv -StartupType Manual
22+
choco install wormies-au-helpers vt-cli -y
23+
Install-Module Pester -RequiredVersion 4.10.1 -Scope CurrentUser -Force -SkipPublisherCheck
24+
git clone -q https://github.com/chocolatey-community/chocolatey-au.git $Env:TEMP/au
25+
. "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version
26+
shell: powershell
27+
- name: System information
28+
run: |
29+
Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version
30+
$PSVersionTable
31+
git --version
32+
choco --version
33+
"Build info"
34+
' {0,-20} {1}' -f 'SCHEDULED BUILD:', ("${{ github.event_name }}" -eq 'schedule')
35+
' {0,-20} {1}' -f 'FORCED BUILD:' , ("${{ github.event_name }}" -eq 'workflow_dispatch')
36+
shell: powershell
37+
- uses: actions/checkout@v3.5.0
38+
with:
39+
fetch-depth: 0
40+
- name: Run package pushing
41+
env:
42+
PACKAGES_PUSHES: ${{ github.event.inputs.packages }}
43+
run: |
44+
$packages = $env:PACKAGES_PUSHES -split ' '
45+
Write-Host "PUSHING PACKAGES: $packages"
46+
foreach ($package in $packages) {
47+
Write-Host ("{0}`n{1}`n" -f ('-'*60), "PACKAGE: $package")
48+
$package_dir = ls -recurse | ? { $_.Name -eq "$package.nuspec" } | select -First 1 | % Directory
49+
50+
if (!$package_dir) { Write-Warning "Can't find package '$package'"; continue }
51+
pushd $package_dir
52+
if (Test-Path update.ps1 -ea 0) { ./update.ps1 }
53+
choco pack
54+
Push-Package
55+
popd
56+
}
57+
shell: powershell
58+
- name: Create diff file
59+
run: |
60+
git add automatic extension manual templates
61+
git diff --cached > unsaved_changes.patch
62+
shell: powershell
63+
- name: Upload artifacts
64+
if: always()
65+
uses: actions/upload-artifact@v3
66+
with:
67+
name: artifacts
68+
path: |
69+
unsaved_changes.patch
70+
eventlogs.txt
71+
**/*.nupkg
72+
retention-days: 5

.github/workflows/package-updater.yml

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Package Updater
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
inputs:
8+
packages:
9+
description: "What is the packages (optionally version) you wish to force update on?"
10+
required: false
11+
schedule:
12+
- cron: "0 3 * * *"
13+
14+
jobs:
15+
updater:
16+
runs-on: windows-2019
17+
env:
18+
au_version: master
19+
au_push: true
20+
github_user_repo: ${{ github.repository }}
21+
github_api_key: ${{ secrets.GIST_API_KEY }}
22+
gist_id: a700c70b8847b29ebb1c918d47ee4eb1
23+
nupkg_cache_path: C:\nupkg_cache
24+
mail_user: ${{ secrets.MAIL_USER }}
25+
mail_pass: ${{ secrets.MAIL_PASSWORD }}
26+
mail_server: smtp.gmail.com
27+
mail_port: 587
28+
mail_enablessl: true
29+
api_key: ${{ secrets.CHOCO_API_KEY }}
30+
nuget_artifacts: ${{ github.runner.temp }}/artifacts
31+
32+
steps:
33+
- name: Configure git client
34+
run: |
35+
git config --global user.email "chocolatey@realdimensions.net"
36+
git config --global user.name "Chocolatey"
37+
git config --global core.safecrlf false
38+
- name: Install Dependencies
39+
run: |
40+
Set-Service wuauserv -StartupType Manual
41+
git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au
42+
. "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version
43+
shell: powershell
44+
- name: System information
45+
run: |
46+
Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version
47+
$PSVersionTable
48+
git --version
49+
choco --version
50+
"Build info"
51+
' {0,-20} {1}' -f 'SCHEDULED BUILD:', ("${{ github.event_name }}" -eq 'schedule')
52+
' {0,-20} {1}' -f 'FORCED BUILD:' , ("${{ github.event_name }}" -eq 'workflow_dispatch')
53+
shell: powershell
54+
- uses: actions/checkout@v3.5.0
55+
with:
56+
fetch-depth: 0
57+
- name: Run package updater
58+
env:
59+
FORCED_PACKAGES: ${{ github.event.inputs.packages }}
60+
run: |
61+
. ./.github/EventLogs.ps1
62+
Clear-EventLogs
63+
Remove-Item "$Env:ChocolateyInstall\logs\*.log"
64+
65+
./update_all.ps1 -ForcedPackages $env:FORCED_PACKAGES
66+
Get-EventLogs * | ? Source -eq 'Schannel' | Format-List * | Out-File eventlogs.txt
67+
shell: powershell
68+
- name: Create diff file
69+
run: |
70+
git add automatic extension manual templates
71+
git diff --cached > unsaved_changes.patch
72+
- name: Create au temporary directory
73+
run: |
74+
if (Test-Path $Env:TEMP\chocolatey\au) { 7z a -mx9 au_temp.7z $Env:TEMP\chocolatey\au\* }
75+
shell: powershell
76+
- name: Upload artifacts
77+
if: always()
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: artifacts
81+
path: |
82+
unsaved_changes.patch
83+
au_temp.7z
84+
update_info.xml
85+
Update-AUPackages.md
86+
eventlogs.txt
87+
**/*.nupkg
88+
retention-days: 5

fzf/fzf.nuspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages -->
66
<id>fzf</id>
77
<title>A command-line fuzzy finder</title>
8-
<version>0.53.0</version>
8+
<version>0.55.0</version>
99
<authors>Junegunn Choi</authors>
1010
<owners>Miodrag Milic</owners>
1111
<summary>fzf is a general-purpose command-line fuzzy finder</summary>
@@ -26,7 +26,7 @@ fzf is a general-purpose command-line fuzzy finder.
2626
<licenseUrl>https://raw.githubusercontent.com/junegunn/fzf-bin/master/LICENSE</licenseUrl>
2727
<requireLicenseAcceptance>false</requireLicenseAcceptance>
2828
<iconUrl>https://cdn.rawgit.com/majkinetor/chocolatey/master/fzf/icon.png</iconUrl>
29-
<releaseNotes>https://github.com/junegunn/fzf/releases/tag/0.53.0</releaseNotes>
29+
<releaseNotes>https://github.com/junegunn/fzf/releases/tag/v0.55.0</releaseNotes>
3030
<docsUrl>https://github.com/junegunn/fzf/blob/master/README.md</docsUrl>
3131
<bugTrackerUrl>https://github.com/junegunn/fzf/issues</bugTrackerUrl>
3232
<projectSourceUrl>https://github.com/junegunn/fzf</projectSourceUrl>

fzf/update.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function global:au_GetLatest {
2222
$version = $url -split '/' | select -Last 1 -Skip 1
2323

2424
return @{
25-
Version = $version
25+
Version = $version.Substring(1)
2626
URL32 = $url
2727
ReleaseNotes = "$GitHubRepositoryUrl/releases/tag/$version"
2828
}

0 commit comments

Comments
 (0)