Skip to content

Commit

Permalink
(f.lux)(winget) Use choco search for depndencies [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
pauby committed Sep 30, 2023
1 parent 559ccb9 commit 42a073e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions automatic/f.lux/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ function global:au_SearchReplace {
function global:au_BeforeUpdate { }

function global:au_GetLatest {
(choco list f.lux.install -e --by-id-only | select -Skip 1 | select -SkipLast 1) -match '^.+?\s+(?<version>.+?)\s+'
$version = (choco search f.lux.install --exact --by-id-only --limit-output | ConvertFrom-Csv -Delimiter '|' -Header 'name', 'version').version

return @{
Version = $matches.version
Version = ConvertTo-VersionNumber -Version ([version]$version) -Part 3
}
}

Expand Down
8 changes: 2 additions & 6 deletions automatic/winget/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@ function global:au_AfterUpdate {

function global:au_GetLatest {

$release = Get-GitHubRelease -OwnerName $repoOwner -RepositoryName $repoName -Latest
$version = $release.tag_name
if ($version.StartsWith('v')) {
$version = $version.Substring(1) # skip over 'v' in tag
}
$version = (choco search winget-cli --exact --by-id-only --limit-output | ConvertFrom-Csv -Delimiter '|' -Header 'name', 'version').version

return @{
Version = $version
Version = ConvertTo-VersionNumber -Version ([version]$version) -Part 3
}
}

Expand Down

0 comments on commit 42a073e

Please sign in to comment.