Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/scripts/update-scoop-manifest.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Points bucket/compactor.json at the latest GitHub release.
# Requires the GitHub CLI (gh) with GH_TOKEN set when run in Actions.
param(
[string]$Manifest = (Join-Path $PSScriptRoot '..\..\bucket\compactor.json')
)

$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'

$text = [IO.File]::ReadAllText($Manifest)
$json = $text | ConvertFrom-Json
$repository = $json.homepage -replace '^https://github\.com/', ''

$tag = gh release view --repo $repository --json tagName --jq .tagName
if ($LASTEXITCODE -ne 0 -or -not $tag) {
throw "Could not read the latest release of $repository."
}

$version = $tag -replace '^v', ''
if ($json.version -eq $version) {
Write-Host "Scoop manifest is already at $version."
return
}

$url = $json.autoupdate.architecture.'64bit'.url -replace '\$version', $version
$download = Join-Path ([IO.Path]::GetTempPath()) "Compactor-$version.exe"
Invoke-WebRequest -Uri $url -OutFile $download -UseBasicParsing
$hash = (Get-FileHash -Path $download -Algorithm SHA256).Hash.ToLowerInvariant()
Remove-Item $download

$text = $text -replace '("version":\s*")[^"]+"', "`${1}$version`""
$text = $text -replace '("url":\s*")[^"$]+"', "`${1}$url`""
$text = $text -replace '("hash":\s*")[^"]+"', "`${1}$hash`""
[IO.File]::WriteAllText($Manifest, $text, (New-Object Text.UTF8Encoding $false))

Write-Host "Updated Scoop manifest from $($json.version) to $version."
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
workflow_dispatch:

permissions:
actions: write
contents: write
pull-requests: read

Expand Down Expand Up @@ -141,3 +142,8 @@ jobs:
--title "Compactor $env:TAG" `
--notes-file release-notes.md `
--verify-tag

- name: Update Scoop manifest
env:
GH_TOKEN: ${{ github.token }}
run: gh workflow run scoop.yml --repo ${{ github.repository }} --ref master
35 changes: 35 additions & 0 deletions .github/workflows/scoop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Update Scoop manifest

on:
schedule:
- cron: '30 6 * * *'
workflow_dispatch:

permissions:
contents: write

jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v7

- name: Update manifest
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: ./.github/scripts/update-scoop-manifest.ps1

- name: Commit manifest
run: |
if git diff --quiet -- bucket/compactor.json; then
exit 0
fi
version=$(jq -r .version bucket/compactor.json)
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add bucket/compactor.json
git commit -m "Update Scoop manifest to $version"
git push
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Added

- Scoop manifest in `bucket/`, so the repository can be added as a Scoop bucket. A scheduled workflow keeps it pointed at the latest release.

## [0.11.5] - 2026-09-14

### Added
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ Download the latest Windows x64 executable from the [Releases](https://github.co

Compactor is portable and does not require an installer or background service.

It can also be installed with [Scoop](https://scoop.sh) from the manifest in this repository:

```powershell
scoop bucket add compactor https://github.com/wefalltomorrow/Compactor
scoop install compactor/compactor
```

Use `scoop update compactor` to upgrade. The `compactor/` prefix matters because the Scoop Extras bucket still carries the original 0.10.1 release under the same name.

## Usage

1. Choose a folder.
Expand Down
26 changes: 26 additions & 0 deletions bucket/compactor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": "0.11.5",
"description": "A lightweight GUI for Windows WOF filesystem compression",
"homepage": "https://github.com/wefalltomorrow/Compactor",
"license": "MIT",
"architecture": {
"64bit": {
"url": "https://github.com/wefalltomorrow/Compactor/releases/download/v0.11.5/Compactor.exe",
"hash": "92ecfed2b4b89fd65a92fd86839b31d009331f92885b43f76109b46ab7efcd20"
}
},
"shortcuts": [
[
"Compactor.exe",
"Compactor"
]
],
"checkver": "github",
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/wefalltomorrow/Compactor/releases/download/v$version/Compactor.exe"
}
}
}
}