Skip to content

Commit 628c8d7

Browse files
authored
Merge branch 'develop' into feat-force-tag
2 parents 5bd165a + b592b38 commit 628c8d7

File tree

8 files changed

+26
-14
lines changed

8 files changed

+26
-14
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
## [Unreleased](https://github.com/ScoopInstaller/Scoop/compare/v0.5.3...develop)
22

3+
### Features
4+
5+
- **install:** Add separator at the end of notes, highlight suggestions ([#6418](https://github.com/ScoopInstaller/Scoop/issues/6418))
6+
37
### Bug Fixes
48

59
- **scoop-update**: Force sync tags w/ remote branch while scoop update ([#6439](https://github.com/ScoopInstaller/Scoop/issues/6439))
6-
- **scoop-download**: Fix function `nightly_version` not defined error ([#6386](https://github.com/ScoopInstaller/Scoop/issues/6386))
10+
- **scoop-download:** Fix function `nightly_version` not defined error ([#6386](https://github.com/ScoopInstaller/Scoop/issues/6386))
11+
- **autoupdate:** Use origin URL to handle URLs with fragment in GitHub mode ([#6455](https://github.com/ScoopInstaller/Scoop/issues/6455))
12+
- **buckets|scoop-info:** Switch git log date format to ISO 8601 to avoid locale issues ([#6446](https://github.com/ScoopInstaller/Scoop/issues/6446))
13+
- **scoop-version:** Fix logic error caused by missing brackets ([#6463](https://github.com/ScoopInstaller/Scoop/issues/6463))
14+
- **core|manifest:** Avoid error messages when searching non-existent 'deprecated' directory ([#6471](https://github.com/ScoopInstaller/Scoop/issues/6471))
715

816
## [v0.5.3](https://github.com/ScoopInstaller/Scoop/compare/v0.5.2...v0.5.3) - 2025-08-11
917

bin/scoop.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ switch ($subCommand) {
2020
}
2121
({ $subCommand -in @('-v', '--version') }) {
2222
Write-Host 'Current Scoop version:'
23-
if (Test-GitAvailable -and (Test-Path "$PSScriptRoot\..\.git") -and (get_config SCOOP_BRANCH 'master') -ne 'master') {
24-
Invoke-Git -Path "$PSScriptRoot\.." -ArgumentList @('log', 'HEAD', '-1', '--oneline')
23+
if ((Test-GitAvailable) -and (Test-Path "$PSScriptRoot\..\.git") -and ((get_config SCOOP_BRANCH 'master') -ne 'master')) {
24+
Invoke-Git -Path "$PSScriptRoot\.." -ArgumentList @('--no-pager', 'log', 'HEAD', '-1', '--oneline')
2525
} else {
2626
$version = Select-String -Pattern '^## \[(v[\d.]+)\].*?([\d-]+)$' -Path "$PSScriptRoot\..\CHANGELOG.md"
2727
Write-Host $version.Matches.Groups[1].Value -ForegroundColor Cyan -NoNewline
@@ -31,9 +31,9 @@ switch ($subCommand) {
3131

3232
Get-LocalBucket | ForEach-Object {
3333
$bucketLoc = Find-BucketDirectory $_ -Root
34-
if (Test-GitAvailable -and (Test-Path "$bucketLoc\.git")) {
34+
if ((Test-GitAvailable) -and (Test-Path "$bucketLoc\.git")) {
3535
Write-Host "'$_' bucket:"
36-
Invoke-Git -Path $bucketLoc -ArgumentList @('log', 'HEAD', '-1', '--oneline')
36+
Invoke-Git -Path $bucketLoc -ArgumentList @('--no-pager', 'log', 'HEAD', '-1', '--oneline')
3737
Write-Host ''
3838
}
3939
}

lib/autoupdate.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
function format_hash([String] $hash) {
44
$hash = $hash.toLower()
55

6+
# Workaround for GitHub API:
7+
# `"digest": "sha256:<SHA256_STRING>"`
68
if ($hash -like 'sha256:*') {
79
$hash = $hash.Substring(7) # Remove prefix 'sha256:'
810
}
@@ -209,13 +211,14 @@ function get_hash_for_app([String] $app, $config, [String] $version, [String] $u
209211
$hash = $null
210212

211213
$hashmode = $config.mode
214+
$originurl = strip_fragment $url
212215
$basename = [System.Web.HttpUtility]::UrlDecode((url_remote_filename($url)))
213216

214217
$substitutions = $substitutions.Clone()
215-
$substitutions.Add('$url', (strip_fragment $url))
216-
$substitutions.Add('$baseurl', (strip_filename (strip_fragment $url)).TrimEnd('/'))
218+
$substitutions.Add('$url', $originurl)
219+
$substitutions.Add('$baseurl', (strip_filename $originurl).TrimEnd('/'))
217220
$substitutions.Add('$basename', $basename)
218-
$substitutions.Add('$urlNoExt', (strip_ext (strip_fragment $url)))
221+
$substitutions.Add('$urlNoExt', (strip_ext $originurl))
219222
$substitutions.Add('$basenameNoExt', (strip_ext $basename))
220223

221224
debug $substitutions
@@ -297,7 +300,7 @@ function get_hash_for_app([String] $app, $config, [String] $version, [String] $u
297300
}
298301
'github' {
299302
$hashfile_url = "https://api.github.com/repos/$($matches['owner'])/$($matches['repo'])/releases"
300-
$hash = find_hash_in_json $hashfile_url $substitutions ("$..assets[?(@.browser_download_url == '" + $url + "')].digest")
303+
$hash = find_hash_in_json $hashfile_url $substitutions ("$..assets[?(@.browser_download_url == '" + $originurl + "')].digest")
301304
}
302305
}
303306

lib/buckets.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function list_buckets {
108108
$path = Find-BucketDirectory $_ -Root
109109
if ((Test-Path (Join-Path $path '.git')) -and (Get-Command git -ErrorAction SilentlyContinue)) {
110110
$bucket.Source = Invoke-Git -Path $path -ArgumentList @('config', 'remote.origin.url')
111-
$bucket.Updated = Invoke-Git -Path $path -ArgumentList @('log', '--format=%aD', '-n', '1') | Get-Date
111+
$bucket.Updated = Invoke-Git -Path $path -ArgumentList @('log', '--format=%aI', '-n', '1') | Get-Date
112112
} else {
113113
$bucket.Source = friendly_path $path
114114
$bucket.Updated = (Get-Item "$path\bucket" -ErrorAction SilentlyContinue).LastWriteTime

lib/core.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ function app_status($app, $global) {
555555
$status.hold = ($install_info.hold -eq $true)
556556

557557
$deprecated_dir = (Find-BucketDirectory -Name $install_info.bucket -Root) + "\deprecated"
558-
$status.deprecated = (Get-ChildItem $deprecated_dir -Filter "$(sanitary_path $app).json" -Recurse).FullName
558+
$status.deprecated = (Get-ChildItem $deprecated_dir -Filter "$(sanitary_path $app).json" -Recurse -ErrorAction Ignore).FullName
559559

560560
$manifest = manifest $app $install_info.bucket $install_info.url
561561
$status.removed = (!$manifest)

lib/install.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ function show_notes($manifest, $dir, $original_dir, $persist_dir) {
359359
Write-Output 'Notes'
360360
Write-Output '-----'
361361
Write-Output (wraptext (substitute $manifest.notes @{ '$dir' = $dir; '$original_dir' = $original_dir; '$persist_dir' = $persist_dir }))
362+
Write-Output '-----'
362363
}
363364
}
364365

@@ -419,7 +420,7 @@ function show_suggestions($suggested) {
419420
}
420421

421422
if (!$fulfilled) {
422-
Write-Host "'$app' suggests installing '$([string]::join("' or '", $feature_suggestions))'."
423+
Write-Host "'$app' suggests installing '$([string]::join("' or '", $feature_suggestions))'." -ForegroundColor DarkYellow
423424
}
424425
}
425426
}

lib/manifest.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function Get-Manifest($app) {
6969
$manifest = manifest $app $bucket
7070
if (!$manifest) {
7171
$deprecated_dir = (Find-BucketDirectory -Name $bucket -Root) + '\deprecated'
72-
$manifest = parse_json (Get-ChildItem $deprecated_dir -Filter "$(sanitary_path $app).json" -Recurse).FullName
72+
$manifest = parse_json (Get-ChildItem $deprecated_dir -Filter "$(sanitary_path $app).json" -Recurse -ErrorAction Ignore).FullName
7373
}
7474
}
7575
}

libexec/scoop-info.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ if ($manifest.depends) {
122122

123123
if (Test-Path $manifest_file) {
124124
if (Get-Command git -ErrorAction Ignore) {
125-
$gitinfo = (Invoke-Git -Path (Split-Path $manifest_file) -ArgumentList @('log', '-1', '-s', '--format=%aD#%an', $manifest_file) 2> $null) -Split '#'
125+
$gitinfo = (Invoke-Git -Path (Split-Path $manifest_file) -ArgumentList @('log', '-1', '-s', '--format=%aI#%an', $manifest_file) 2> $null) -Split '#'
126126
}
127127
if ($gitinfo) {
128128
$item.'Updated at' = $gitinfo[0] | Get-Date

0 commit comments

Comments
 (0)