├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── hash_check_fail.md │ └── manifest_request.md └── workflows │ ├── schedule.yml │ ├── pull_request.yml │ ├── issue_comment.yml │ └── issue.yml ├── .gitignore ├── bucket └── .gitkeep ├── .gitattributes ├── Bucket.Tests.ps1 ├── README.template.md ├── bin ├── test.ps1 ├── Helpers.ps1 ├── formatjson.ps1 ├── describe.ps1 ├── missing-checkver.ps1 ├── auto-pr.ps1 ├── checkurls.ps1 ├── checkAndPush.ps1 ├── checkhashes.ps1 └── checkver.ps1 ├── .editorconfig ├── .vscode ├── extensions.json ├── settings.json ├── json.code-snippets ├── Template.jsonc └── tasks.json ├── .appveyor.yml └── README.md /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @Ash258 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /checkver* 2 | /.cache/ 3 | /.vagrant/ 4 | -------------------------------------------------------------------------------- /bucket/.gitkeep: -------------------------------------------------------------------------------- 1 | Some text to keep CRLF for passing tests without manifest 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # retain windows line-endings in case checked out on mac or linux 2 | * text eol=crlf 3 | .git/hooks/* text eol=lf 4 | -------------------------------------------------------------------------------- /Bucket.Tests.ps1: -------------------------------------------------------------------------------- 1 | if (-not ($env:SCOOP_HOME)) { $env:SCOOP_HOME = scoop prefix scoop | Resolve-Path } 2 | 3 | . "$env:SCOOP_HOME\test\Import-Bucket-Tests.ps1" 4 | -------------------------------------------------------------------------------- /README.template.md: -------------------------------------------------------------------------------- 1 | # Scoop %%BUCKET_NAME%% Bucket %%SAMPLE_MARKDOWN_BADGE_CODE%% 2 | 3 | `scoop bucket add %%NICE_NAME_TO_BE_SHOWN_TO_USER%% '%%HTTPS_GITHUB_REPOSITORY_URL.git%%'` 4 | -------------------------------------------------------------------------------- /bin/test.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Execute Pester tests in repository root directory. 4 | #> 5 | 6 | $result = Invoke-Pester "$PSScriptRoot\.." -PassThru 7 | 8 | exit $result.FailedCount 9 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = crlf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [.git/hooks/*] 12 | end_of_line = lf 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /bin/Helpers.ps1: -------------------------------------------------------------------------------- 1 | $ROOT_DIRECTORY = Resolve-Path "$PSScriptRoot\.." 2 | $BUCKET_DIRECTORY = Resolve-Path "$ROOT_DIRECTORY\bucket" 3 | 4 | function Get-RecursiveFolder { 5 | $folders = @($ROOT_DIRECTORY) 6 | $folders += Get-ChildItem $ROOT_DIRECTORY -Directory | Where-Object { $_ -inotmatch '.vscode|bin' } 7 | 8 | return Resolve-Path $folders 9 | } 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/hash_check_fail.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Hash check fail 3 | about: Installation failed due to hash check. 4 | title: '%%manifest%%@%%version%%: Hash check failed' 5 | --- 6 | 7 | 8 | 9 | 10 | ```powershell 11 | 12 | ``` 13 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "CoenraadS.bracket-pair-colorizer-2", 4 | "DavidAnson.vscode-markdownlint", 5 | "EditorConfig.EditorConfig", 6 | "fabiospampinato.vscode-terminals", 7 | "ms-vscode.powershell-preview", 8 | "redhat.vscode-yaml", 9 | "usernamehw.errorlens", 10 | "yzhang.markdown-all-in-one", 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /.github/workflows/schedule.yml: -------------------------------------------------------------------------------- 1 | on: 2 | schedule: 3 | - cron: '0 * * * *' 4 | name: Excavator 5 | jobs: 6 | excavate: 7 | name: Excavator 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@main 11 | - name: Excavate 12 | uses: Ash258/Scoop-GithubActions@stable 13 | env: 14 | GITH_EMAIL: youremail@email.com 15 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 16 | SKIP_UPDATED: '1' 17 | -------------------------------------------------------------------------------- /.github/workflows/pull_request.yml: -------------------------------------------------------------------------------- 1 | on: 2 | pull_request: 3 | types: [ opened ] 4 | name: Pull Requests 5 | jobs: 6 | pullRequestHandler: 7 | name: Pull Request Validator 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@main 11 | - name: Pull Request Validation 12 | uses: Ash258/Scoop-GithubActions@stable 13 | env: 14 | GITH_EMAIL: youremail@email.com 15 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 16 | -------------------------------------------------------------------------------- /.github/workflows/issue_comment.yml: -------------------------------------------------------------------------------- 1 | on: 2 | issue_comment: 3 | types: [ created ] 4 | name: Commented Pull Request 5 | jobs: 6 | pullRequestHandler: 7 | name: Pull Request Validator 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@main 11 | - name: Pull Request Validation 12 | uses: Ash258/Scoop-GithubActions@stable 13 | if: startsWith(github.event.comment.body, '/verify') 14 | env: 15 | GITH_EMAIL: youremail@email.com 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | -------------------------------------------------------------------------------- /.github/workflows/issue.yml: -------------------------------------------------------------------------------- 1 | on: 2 | issues: 3 | types: [ opened, labeled ] 4 | name: Issues 5 | jobs: 6 | issueHandler: 7 | runs-on: ubuntu-latest 8 | name: Issue Verification 9 | steps: 10 | - uses: actions/checkout@main 11 | - name: Verify Issue 12 | uses: Ash258/Scoop-GithubActions@stable 13 | if: github.event.action == 'opened' || (github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'verify')) 14 | env: 15 | GITH_EMAIL: youremail@email.com 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/manifest_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New manifest request 3 | about: Request new manifest to be added into this bucket. 4 | title: '[Request] Add %%applicationName%%' 5 | labels: request, help wanted 6 | --- 7 | 8 | 9 | 10 | - **URL to application**: <> 11 | - **Latest version**: 12 | - **Graphical interface**: Yes/No 13 | - **Portable version**: Yes/No 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /bin/formatjson.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Format manifests using scoop's formatter. 4 | .PARAMETER App 5 | Manifest name. 6 | .PARAMETER Dir 7 | Where to search for manifests. 8 | Default to bucket folder. 9 | #> 10 | param( 11 | [Parameter(ValueFromPipeline = $true)] 12 | [Alias('App')] 13 | [String[]] $Manifest = '*', 14 | [ValidateScript( { if ( Test-Path $_ -Type Container) { $true } else { $false } })] 15 | [String] $Dir = "$PSScriptRoot\..\bucket" 16 | ) 17 | 18 | begin { 19 | if (-not $env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } 20 | $Dir = Resolve-Path $Dir 21 | } 22 | 23 | process { foreach ($man in $Manifest) { Invoke-Expression -Command "$env:SCOOP_HOME\bin\formatjson.ps1 -App ""$man"" -Dir ""$Dir""" } } 24 | 25 | end { Write-Host 'DONE' -ForegroundColor Yellow } 26 | -------------------------------------------------------------------------------- /bin/describe.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Find description for given manifest 4 | .PARAMETER Manifest 5 | Manifest to check. 6 | It could be List of manifests, specific manifest or string with placeholder. 7 | .PARAMETER Dir 8 | Where to search for manifest. 9 | Default to bucket folder. 10 | #> 11 | param( 12 | [Parameter(ValueFromPipeline = $true)] 13 | [Alias('App')] 14 | [String[]] $Manifest = '*', 15 | [ValidateScript( { if ( Test-Path $_ -Type Container) { $true } else { $false } })] 16 | [String] $Dir = "$PSScriptRoot\..\bucket" 17 | ) 18 | 19 | begin { 20 | if (-not $env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } 21 | $Dir = Resolve-Path $Dir 22 | } 23 | 24 | process { foreach ($man in $Manifest) { Invoke-Expression -Command "$env:SCOOP_HOME\bin\describe.ps1 -App ""$man"" -Dir ""$Dir""" } } 25 | 26 | end { Write-Host 'DONE' -ForegroundColor Yellow } 27 | -------------------------------------------------------------------------------- /.appveyor.yml: -------------------------------------------------------------------------------- 1 | skip_commits: 2 | files: 3 | - '**/*.md' 4 | - '.vscode/**/*' 5 | cache: 6 | - '%USERPROFILE%\Documents\WindowsPowerShell\Modules -> .appveyor.yml' 7 | matrix: 8 | fast_finish: true 9 | build: 'off' 10 | image: Visual Studio 2019 11 | environment: 12 | SCOOP: C:\projects\scoop 13 | SCOOP_HOME: C:\projects\scoop\apps\scoop\current 14 | matrix: 15 | - PowerShell: 5 16 | - PowerShell: 7 17 | init: 18 | - ps: | 19 | (Get-PSProvider 'FileSystem').Home = 'C:\projects\' 20 | if(!(Test-Path "$env:SCOOP_HOME")) { git clone -q --depth=1 "https://github.com/lukesampson/scoop" "$env:SCOOP_HOME" } 21 | for: 22 | - matrix: 23 | only: 24 | - PowerShell: 5 25 | install: 26 | - ps: . "$env:SCOOP_HOME\test\bin\init.ps1" 27 | test_script: 28 | - ps: . "$env:SCOOP_HOME\test\bin\test.ps1" -TestPath "$env:APPVEYOR_BUILD_FOLDER" 29 | - matrix: 30 | only: 31 | - PowerShell: 7 32 | install: 33 | - pwsh: . "$env:SCOOP_HOME\test\bin\init.ps1" 34 | test_script: 35 | - pwsh: . "$env:SCOOP_HOME\test\bin\test.ps1" -TestPath "$env:APPVEYOR_BUILD_FOLDER" 36 | -------------------------------------------------------------------------------- /bin/missing-checkver.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Check if manifests have checkver and autoupdate property. 4 | .DESCRIPTION 5 | Check if manifests have checkver property. 6 | .PARAMETER App 7 | Manifest name. 8 | .PARAMETER Dir 9 | Directory where to search for manfiest. 10 | Default to bucket folder. 11 | .PARAMETER Rest 12 | -s - Skip supported 13 | .EXAMPLE 14 | PS BUCKETROOT > .\bin\missing-checkver.ps1 15 | Check all manifests inside root of bucket. 16 | .EXAMPLE 17 | PS BUCKETROOT > .\bin\missing-checkver.ps1 TODO 18 | Check all manifests inside TODO directory. 19 | .EXAMPLE 20 | PS BUCKETROOT > .\bin\missing-checkver.ps1 -dir TODO 21 | Check all manifests inside TODO directory. 22 | #> 23 | param( 24 | [Parameter(ValueFromPipeline = $true)] 25 | [Alias('App')] 26 | [String] $Manifest = '*', 27 | [ValidateScript( { if ( Test-Path $_ -Type Container) { $true } else { $false } })] 28 | [String] $Dir = "$PSScriptRoot\..\bucket", 29 | [Parameter(ValueFromRemainingArguments = $true)] 30 | [String[]] $Rest = '' 31 | ) 32 | 33 | begin { 34 | if (-not $env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } 35 | $Dir = Resolve-Path $Dir 36 | $Rest = $Rest -join ' ' 37 | } 38 | 39 | process { Invoke-Expression -Command "$env:SCOOP_HOME\bin\missing-checkver.ps1 -App ""$Manifest"" -Dir ""$Dir"" $Rest" } 40 | 41 | end { Write-Host 'DONE' -ForegroundColor Yellow } 42 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "json.schemas": [ 3 | { 4 | "url": "https://raw.githubusercontent.com/lukesampson/scoop/master/schema.json", 5 | "fileMatch": [ 6 | ".vscode/Template.jsonc", 7 | "bucket/*.json", 8 | ], 9 | }, 10 | ], 11 | "powershell.codeFormatting.preset": "OTBS", 12 | "terminals.terminals": [ 13 | { 14 | "name": "Powershell", 15 | "shellPath": "powershell.exe", 16 | "shellArgs": [ 17 | "-NoLogo", 18 | "-NoExit", 19 | ], 20 | "focus": true, 21 | "open": true, 22 | }, 23 | { 24 | "name": "Powershell Core", 25 | "shellPath": "pwsh.exe", 26 | "shellArgs": [ 27 | "-NoLogo", 28 | "-NoExit", 29 | ], 30 | "focus": true, 31 | "open": true, 32 | }, 33 | { 34 | "name": "Powershell Core (Preview)", 35 | "shellPath": "pwsh-preview.exe", 36 | "shellArgs": [ 37 | "-NoLogo", 38 | "-NoExit", 39 | ], 40 | "focus": true, 41 | "open": true, 42 | }, 43 | ], 44 | "yaml.format.bracketSpacing": true, 45 | "yaml.format.enable": true, 46 | "yaml.format.singleQuote": true, 47 | "yaml.validate": true, 48 | "yaml.schemas": { 49 | "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/appveyor.json": "appveyor.yml", 50 | "https://raw.githubusercontent.com/lukesampson/scoop/master/schema.json": [ 51 | "bucket/*.yml", 52 | ], 53 | "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json": [ 54 | ".github/workflows/*", 55 | ], 56 | }, 57 | } 58 | -------------------------------------------------------------------------------- /bin/auto-pr.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Updates manifests and pushes them or creates pull-requests. 4 | .DESCRIPTION 5 | Updates manifests and pushes them to directly the master branch or creates pull-requests for upstream. 6 | .PARAMETER Manifest 7 | Specify manifest to be updated. 8 | .PARAMETER Dir 9 | Specify directory with manifests. 10 | .PARAMETER Upstream 11 | Specify upstream repository with target branch. 12 | .PARAMETER Push 13 | Specify if updates should be directly pushed to 'origin master'. 14 | .PARAMETER Request 15 | Specify if pull-requests should be created on 'upstream master' for each manifest. 16 | .PARAMETER SpecialSnowflakes 17 | Specify list of manifests, which should be force updated. 18 | #> 19 | param( 20 | [Alias('App', 'Name')] 21 | [String] $Manifest = '*', 22 | [ValidateScript( { if ( Test-Path $_ -Type Container) { $true } else { $false } })] 23 | [String] $Dir = "$PSScriptRoot\..\bucket", 24 | [ValidatePattern('^(.+)\/(.+):(.+)$')] 25 | [String] $Upstream = $((git config --get remote.origin.url) -replace '^.+[:/](?.*)\/(?.*)(\.git)?$', '${user}/${repo}:master'), 26 | [Switch] $Push, 27 | [Switch] $Request, 28 | [string[]] $SpecialSnowflakes 29 | ) 30 | 31 | begin { 32 | if (-not $env:SCOOP_HOME) { 33 | if (-not (Get-Command 'scoop' -ErrorAction SilentlyContinue)) { throw 'Scoop installation or SCOOP_HOME environment is required' } 34 | $env:SCOOP_HOME = scoop prefix scoop | Resolve-Path 35 | } 36 | $Params = @{ 37 | App = $Manifest 38 | Dir = Resolve-Path $Dir 39 | Upstream = $Upstream 40 | Push = $Push 41 | Request = $Request 42 | SpecialSnowflakes = $SpecialSnowflakes 43 | SkipUpdated = $true 44 | } 45 | } 46 | 47 | process { & "$env:SCOOP_HOME\bin\auto-pr.ps1" @Params } 48 | 49 | end { Write-Host 'DONE' -ForegroundColor Yellow } 50 | -------------------------------------------------------------------------------- /bin/checkurls.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Check if all urls inside manifest are valid. 4 | .PARAMETER Manifest 5 | Manifest to check. 6 | Wildcard * is supported. 7 | .PARAMETER Dir 8 | Location where to search manifests. 9 | Default to bucket folder. 10 | .PARAMETER Timeout 11 | How many seconds to wait until mark URL as invalid. 12 | .PARAMETER Rest 13 | -s - Skip manifests will all URLs valid. 14 | .EXAMPLE 15 | PS BUCKETROOT > .\bin\checkurls 16 | Check urls for all manifests in root of bucket. 17 | .EXAMPLE 18 | PS BUCKETROOT > .\bin\checkurls cosi 19 | Check urls for cosi.json manifest in root of bucket. 20 | .EXAMPLE 21 | PS BUCKETROOT > .\bin\checkurls cosi TODO 22 | Check urls for cosi.json manifest in TODO directory. 23 | .EXAMPLE 24 | PS BUCKETROOT > .\bin\checkurls cosi TODO 25 25 | Check urls for cosi.json manifest in TODO directory with 25 timeout. 26 | .EXAMPLE 27 | PS BUCKETROOT > .\bin\checkurls -dir TODO 28 | Check urls for all manifests in TODO directory. 29 | #> 30 | param( 31 | [Parameter(ValueFromPipeline = $true)] 32 | [Alias('App')] 33 | [String[]] $Manifest = '*', 34 | [ValidateScript( { if ( Test-Path $_ -Type Container) { $true } else { $false } })] 35 | [String] $Dir = "$PSScriptRoot\..\bucket", 36 | [Int] $Timeout = 5, 37 | [Switch] $Recurse, 38 | [Parameter(ValueFromRemainingArguments = $true)] 39 | [String[]] $Rest = @() 40 | ) 41 | 42 | begin { 43 | if (-not $env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } 44 | $Dir = Resolve-Path $Dir 45 | $Script = "$env:SCOOP_HOME\bin\checkurls.ps1" 46 | $Rest = ($Rest | Select-Object -Unique) -join ' ' 47 | } 48 | 49 | process { 50 | if ($Recurse) { 51 | Get-RecursiveFolder | ForEach-Object { Invoke-Expression -Command "$Script -Dir ""$_"" -Timeout $Timeout $Rest" } 52 | } else { 53 | foreach ($man in $Manifest) { Invoke-Expression -Command "$Script -App ""$man"" -Dir ""$Dir"" -Timeout $Timeout $Rest" } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /bin/checkAndPush.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Update manifest, commit and push. 4 | .DESCRIPTION 5 | Use as vscode task: 6 | 1. Open manifest in editor 7 | 1. Press CTRL+SHIFT+B or CTRL+F9 (IntelliJ) 8 | 1. Be surprised 9 | .PARAMETER Manifest 10 | Full Path to manifest. (vscode ${file}) 11 | .PARAMETER Force 12 | Force parameter will be passed to checkver. 13 | .PARAMETER Hashes 14 | checkhashes.ps1 script will be executed instead of checkver.ps1 15 | #> 16 | param( 17 | [Alias('App')] 18 | [String[]] $Manifest, 19 | [Alias('ForceUpdate')] 20 | [Switch] $Force, 21 | [Switch] $Hashes 22 | ) 23 | 24 | begin { 25 | . "$PSScriptRoot\Helpers.ps1" 26 | 27 | if ($Force) { $arg = '-ForceUpdate' } else { $arg = '-Update' } 28 | } 29 | 30 | process { 31 | foreach ($man in $Manifest) { 32 | # TODO: Yaml 33 | # if (-not ($man.EndsWith('.yml'))) { 34 | # $man += '.yml' 35 | # } 36 | if (-not ($man.EndsWith('.json'))) { 37 | $man += '.json' 38 | } 39 | $man = Resolve-Path $man 40 | $folder = Split-Path $man -Parent 41 | $file = Split-Path $man -Leaf 42 | $noExt = ($file -split '\.')[0] 43 | $cmd = 'checkver' 44 | 45 | if ($Force) { scoop cache rm $noExt } 46 | if ($Hashes) { $cmd = 'checkhashes' } 47 | 48 | Invoke-Expression -Command "$PSScriptRoot\$cmd.ps1 '$noExt' '$folder' $arg" 49 | 50 | $updated = @(git status -s) 51 | 52 | if (($updated -match "$noExt").Count -gt 0) { 53 | # TODO: Yaml 54 | # $manifest = Get-Content $man -Raw -Encoding UTF8 | ConvertFrom-Yaml -Ordered 55 | [psobject] $manifest = Get-Content $man -Raw -Encoding UTF8 | ConvertFrom-Json 56 | $message = "$noExt`: Bumped to $($manifest.version)" 57 | 58 | if ($Hashes) { $message = "${noExt}: Fixed hashes" } 59 | 60 | Write-Host 'Commiting' -ForegroundColor Green 61 | git commit --message $message --only "*$file" 62 | $exit = $LASTEXITCODE 63 | 64 | if ($exit -gt 0) { 65 | Write-Host 'Pre-commit hook failed.' -ForegroundColor Red 66 | exit $exit 67 | } 68 | 69 | Write-Host 'Pushing' -ForegroundColor Green 70 | git push 71 | 72 | Write-Host 'DONE' -ForegroundColor Yellow 73 | } else { 74 | Write-Host 'No Changes' -ForegroundColor Yellow 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /bin/checkhashes.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Check hashes of all URLs inside manifest. 4 | .DESCRIPTION 5 | Check hashes of all URLs inside manifest. 6 | Script will download every URL and then calculate hash of them. 7 | .PARAMETER Manifest 8 | Specify the name of manifest to be checked. 9 | Placeholders are supported. 10 | .PARAMETER Dir 11 | Specify the directory with manifests. 12 | Default to bucket folder. 13 | .PARAMETER Rest 14 | -u - Update hashes if there are mismatched ones. 15 | -f - Update hashes always (even without mismatch). 16 | -k - Use cache. 17 | .EXAMPLE 18 | PS BUCKETDIR> .\bin\checkhashes.ps1 19 | Check URLs of all manifests. 20 | .EXAMPLE 21 | PS BUCKETDIR> .\bin\checkhashes.ps1 MAN 22 | Check URLs of manifests MAN.json inside bucket root. 23 | .EXAMPLE 24 | PS BUCKETDIR> .\bin\checkhashes.ps1 MAN TODO 25 | Check URLs of manifests MAN.json inside folder ./BUCKETROOT/TODO. 26 | .EXAMPLE 27 | PS BUCKETDIR> .\bin\checkhashes.ps1 MAN -u 28 | Check URLs of manifests MAN and update if there are some mismatches. 29 | .EXAMPLE 30 | PS BUCKETDIR> .\bin\checkhashes.ps1 MAN -f 31 | Check URLs of manifests MAN and update even if every hash is correct. 32 | .EXAMPLE 33 | PS BUCKETDIR> .\bin\checkhashes.ps1 MAN -k 34 | Check URLs of manifests MAN and keep it's downloaded files. 35 | #> 36 | param( 37 | [Parameter(ValueFromPipeline = $true)] 38 | [Alias('App', 'Name')] 39 | [String[]] $Manifest = '*', 40 | [ValidateScript( { if ( Test-Path $_ -Type Container) { $true } else { $false } })] 41 | [String] $Dir = "$PSScriptRoot\..\bucket", 42 | [Switch] $Recurse, 43 | [Parameter(ValueFromRemainingArguments)] 44 | [String[]] $Rest 45 | ) 46 | 47 | 48 | begin { 49 | . "$PSScriptRoot\Helpers.ps1" 50 | 51 | if (-not $env:SCOOP_HOME) { 52 | if (-not (Get-Command 'scoop' -ErrorAction SilentlyContinue)) { throw 'Scoop installation or SCOOP_HOME environment is required' } 53 | $env:SCOOP_HOME = scoop prefix scoop | Resolve-Path 54 | } 55 | $Dir = Resolve-Path $Dir 56 | $Script = "$env:SCOOP_HOME\bin\checkhashes.ps1" 57 | $Rest = ($Rest | Select-Object -Unique) -join ' ' 58 | } 59 | 60 | process { 61 | if ($Recurse) { 62 | Get-RecursiveFolder | ForEach-Object { Invoke-Expression -Command "$Script -Dir ""$_"" $Rest" } 63 | } else { 64 | foreach ($man in $Manifest) { Invoke-Expression -Command "$Script -App ""$man"" -Dir ""$Dir"" $Rest" } 65 | } 66 | } 67 | 68 | end { Write-Host 'DONE' -ForegroundColor Yellow } 69 | -------------------------------------------------------------------------------- /bin/checkver.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Check version of given manifests. 4 | .DESCRIPTION 5 | Check version of given manifests (If no manifest is present, all manifests in root of repo will be checked). 6 | -s Parameter is set to true by default. (use -ns to show all) 7 | Few control parameters could be used. 8 | -u - Update given manifests 9 | -f - Force update given manifests 10 | .PARAMETER Manifest 11 | Manifest to check. 12 | It could be List of manifests, specific manifest or string with placeholder. 13 | .PARAMETER Dir 14 | Where to search for manifest. 15 | Default to bucket folder. 16 | .PARAMETER Recurse 17 | Manifests in all subdirectories will be checked. (except .vscode and bin) 18 | .PARAMETER Rest 19 | -s - Skip manifest with latest version 20 | -u - Update given manifests 21 | -f - Force update given manifests 22 | Usefull for hash updates 23 | .EXAMPLE 24 | PS BUCKETROOT > .\bin\checkver.ps1 25 | Check all manifests in root. 26 | .EXAMPLE 27 | PS BUCKETROOT > .\bin\checkver.ps1 MANIFEST 28 | Check manifest with name MANIFEST.json in root. 29 | .EXAMPLE 30 | PS BUCKETROOT > .\bin\checkver.ps1 -manifest MANIFEST 31 | Check manifest with name MANIFEST.json in root. 32 | .EXAMPLE 33 | PS BUCKETROOT > .\bin\checkver.ps1 -dir TODO -manifest MANIFEST 34 | Check manifest with name MANIFEST.json in TODO directory. 35 | .EXAMPLE 36 | PS BUCKETROOT > .\bin\checkver.ps1 MANIFEST TODO 37 | Check manifest with name MANIFEST.json in directory TODO. 38 | .EXAMPLE 39 | PS BUCKETROOT > .\bin\checkver.ps1 -dir TODO 40 | Check all manifests in directory TODO. 41 | .EXAMPLE 42 | PS BUCKETROOT > .\bin\checkver.ps1 MAN* 43 | Check all manifests starting with MAN in root. 44 | .EXAMPLE 45 | PS BUCKETROOT > .\bin\checkver.ps1 Manifest1, Manifest2, Manifest3 46 | Check all manifests (Manifest 1 to 3) in root. 47 | .EXAMPLE 48 | PS BUCKETROOT > .\bin\checkver.ps1 MANIFEST -u 49 | Check manifest with name MANIFEST.json in root and update if there is new version. 50 | .EXAMPLE 51 | PS BUCKETROOT > .\bin\checkver.ps1 MANIFEST -f 52 | Check manifest with name MANIFEST.json in root and update even when there is no new version. 53 | #> 54 | param( 55 | [Parameter(ValueFromPipeline = $true)] 56 | [Alias('App')] 57 | [String[]] $Manifest = '*', 58 | [ValidateScript( { if ( Test-Path $_ -Type Container) { $true } else { $false } })] 59 | [String] $Dir = "$PSScriptRoot\..\bucket", 60 | [Switch] $Recurse, 61 | [Parameter(ValueFromRemainingArguments = $true)] 62 | [String[]] $Rest = @() 63 | ) 64 | 65 | begin { 66 | . "$PSScriptRoot\Helpers.ps1" 67 | 68 | if (-not $env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } 69 | $Dir = Resolve-Path $Dir 70 | $Script = "$env:SCOOP_HOME\bin\checkver.ps1" 71 | $Rest = $Rest | Select-Object -Unique # Remove duplicated switches 72 | } 73 | 74 | process { 75 | if ($Recurse) { 76 | Get-RecursiveFolder | ForEach-Object { Invoke-Expression -Command "$Script -Dir ""$_"" $Rest" } 77 | } else { 78 | foreach ($man in $Manifest) { Invoke-Expression -Command "$Script -App ""$man"" -Dir ""$Dir"" $Rest" } 79 | } 80 | } 81 | 82 | end { Write-Host 'DONE' -ForegroundColor Yellow } 83 | -------------------------------------------------------------------------------- /.vscode/json.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "New app String": { 3 | "prefix": "app", 4 | "scope": "json,jsonc", 5 | "body": [ 6 | "{", 7 | "\t\"version\": \"$1\",", 8 | "\t\"description\": \"$2\",", 9 | "\t\"homepage\": \"$3\",", 10 | "\t\"license\": {\"identifier\": \"$4\"},", 11 | "\t\"notes\": \"$5\",", 12 | "\t\"depends\": \"$6\",", 13 | "\t\"url\": \"$7\",", 14 | "\t\"hash\": \"$8\",", 15 | "\t\"bin\": \"$9\",", 16 | "\t\"shortcuts\": [", 17 | "\t\t[", 18 | "\t\t\t\"$10.exe\",", 19 | "\t\t\t\"$11\"", 20 | "\t\t]", 21 | "\t],", 22 | "\t\"checkver\":\"$12\",", 23 | "\t\"autoupdate\": {", 24 | "\t\t\"url\": \"$13\"", 25 | "\t}", 26 | "}\n", 27 | ], 28 | }, 29 | "New app Arch": { 30 | "prefix": "appArch", 31 | "scope": "json,jsonc", 32 | "body": [ 33 | "{", 34 | "\t\"version\": \"$1\",", 35 | "\t\"description\": \"$2\",", 36 | "\t\"homepage\": \"$3\",", 37 | "\t\"license\": {\"identifier\": \"$4\"},", 38 | "\t\"notes\": \"$5\",", 39 | "\t\"depends\": \"$6\",", 40 | "\t\"architecture\": {", 41 | "\t\t\"64bit\": {", 42 | "\t\t\t\"url\": \"$7\",", 43 | "\t\t\t\"hash\": \"$8\"", 44 | "\t\t},", 45 | "\t\t\"32bit\": {", 46 | "\t\t\t\"url\": \"$9\",", 47 | "\t\t\t\"hash\": \"$10\"", 48 | "\t\t}", 49 | "\t},", 50 | "\t\"bin\": \"$11\",", 51 | "\t\"shortcuts\": [", 52 | "\t\t[", 53 | "\t\t\t\"$12.exe\",", 54 | "\t\t\t\"$13\"", 55 | "\t\t]", 56 | "\t]", 57 | "}\n", 58 | ], 59 | }, 60 | "New Architecture": { 61 | "prefix": "arch", 62 | "scope": "json,jsonc", 63 | "body": [ 64 | "\"architecture\": {", 65 | "\t\"64bit\": {", 66 | "\t\t\"url\": \"$1\",", 67 | "\t\t\"hash\": \"$2\"", 68 | "\t},", 69 | "\t\"32bit\": {", 70 | "\t\t\"url\": \"$3\",", 71 | "\t\t\"hash\": \"$4\"", 72 | "\t}", 73 | "},", 74 | ], 75 | }, 76 | "New Autoupdate with Arch": { 77 | "prefix": "upAr", 78 | "scope": "json,jsonc", 79 | "body": [ 80 | "\"autoupdate\": {", 81 | "\t\"architecture\": {", 82 | "\t\t\"64bit\": {", 83 | "\t\t\t\"url\": \"$1\"", 84 | "\t\t},", 85 | "\t\t\"32bit\": {", 86 | "\t\t\t\"url\": \"$2\"", 87 | "\t\t}", 88 | "\t}", 89 | "}", 90 | ], 91 | }, 92 | "Check for existing persist file": { 93 | "prefix": "persistCheck", 94 | "scope": "json,jsonc", 95 | "body": [ 96 | "\"\\$file = '$1'\",", 97 | "\"if (!(Test-Path \\\"\\$persist_dir\\\\\\\\\\$file\\\")) {\",", 98 | "\"\t\\$CONT = @('$2')\",", 99 | "\"\tSet-Content \\\"\\$dir\\\\\\\\\\$file\\\" $CONT -Encoding Ascii\",", 100 | "\"}\"", 101 | ], 102 | }, 103 | "Inline persist check (With content)": { 104 | "prefix": "persistInlineContent", 105 | "scope": "json,jsonc", 106 | "body": "\"if (! (Test-Path \\\"\\$persist_dir\\\\\\\\$1\\\")) { Set-Content \\\"\\$dir\\\\\\\\$1\\\" $2 -Encoding Ascii }\",", 107 | }, 108 | "Inline persist check (without content)": { 109 | "prefix": "persistInlineNoContent", 110 | "scope": "json,jsonc", 111 | "body": "\"if (! (Test-Path \\\"\\$persist_dir\\\\\\\\$1\\\")) { New-Item \\\"\\$dir\\\\\\\\$1\\\" | Out-Null }\",", 112 | }, 113 | } 114 | -------------------------------------------------------------------------------- /.vscode/Template.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | //#region General Information 3 | "##": "Some general comment for other maintainers", 4 | "version": "1.0", 5 | "description": "Meaningful description.", 6 | "homepage": "https://ash258.com", 7 | "license": { 8 | "identifier": "MIT", 9 | "url": "https://ash258.com" // Whenever possible attach a program specific URL, otherwise do not use 10 | }, 11 | "notes": [ // String or Array Of Strings 12 | "Some notes shown after installation" 13 | ], 14 | //#endregion General Information 15 | //#region Requirements 16 | // "depends": "MANIFEST", 17 | // or Array of string 18 | "depends": [ 19 | "bucket/someManifest", 20 | "manifest" 21 | ], 22 | "suggest": { 23 | "COSI": "COSI" 24 | // "Array": [ 25 | // "bucket/manifest", 26 | // "manifest", 27 | // ] 28 | }, 29 | //#endregion Requirements 30 | //#region Downloading 31 | "cookie": { 32 | "name": "value" 33 | }, 34 | "architecture": { // Or platform specific below (URL, Hash, extract) 35 | "64bit": { 36 | "url": "https://ash258.com", 37 | "hash": "899346f9f283a4fd5aa03015a3f58cde5b9c0b6a5c4d64c2cc74e9b22c1348d7", 38 | "extract_dir": "DIRECTORY INSIDE ARCHIVE" 39 | }, 40 | "32bit": { 41 | "url": [ 42 | "https://ash258.com", 43 | "https://ash258.com#/cosi.zip" 44 | ], 45 | "hash": [ 46 | "899346f9f283a4fd5aa03015a3f58cde5b9c0b6a5c4d64c2cc74e9b22c1348d7", 47 | "md5:899346f9f283a4fd5aa03015a3f58cde" 48 | ], 49 | "extract_dir": [ 50 | "DirectoryInFirstURL", 51 | "DirectoryInSecondtURL" 52 | ] 53 | } 54 | }, 55 | //#endregion Downloading 56 | //#region Extracting 57 | "innosetup": true, 58 | "extract_dir": "FOLDER", 59 | "extract_to": "folder", 60 | //#endregion Extracting 61 | //#region Installing 62 | "pre_install": [ // String or Array Of Strings 63 | "Run some powershell commands executed before running installer", 64 | "other command" 65 | ], 66 | "installer": { 67 | "file": "filename.exe", // Not needed to be specified if installer is downloaded file 68 | "args": "ARGUMENT" // String or Array Of Strings 69 | }, 70 | "post_install": "Some powershell commands executed after running installer", 71 | //#region UnInstalling 72 | "uninstaller": { 73 | "file": "uninstaller.exe", 74 | "args": "ARGUMENT" // String or Array Of Strings 75 | }, 76 | //$endregion UnInstalling 77 | //#endregion Installing 78 | //#region Links 79 | "bin": [ // String or Array Of Array Of Strings 80 | "singlebinary.exe", 81 | [ 82 | "singlebinary.exe", 83 | "withOtherName" 84 | ], 85 | [ 86 | "singlebinary.exe", 87 | "withOtherName", 88 | "andSomeArguments" 89 | ] 90 | ], 91 | "shortcuts": [ // Array Of Array Of Strings (similar to bin) 92 | [ 93 | "file.exe", 94 | "Shortcut Name" 95 | ], 96 | [ 97 | "singlebinary.exe", 98 | "withOtherName", 99 | "", // Keep blank if none 100 | "withOtherIcon.ico" 101 | ] 102 | ], 103 | "psmodule": { 104 | "name": "moduleName" 105 | }, 106 | "env_add_path": "bin", // String or Array Of Strings 107 | "env_set": { 108 | "KEY": "value" 109 | }, 110 | "persist": [ // String or Array Of Strings 111 | "FOLDERTOPERSIST", 112 | "FILETOPERSIST.extension" 113 | ], 114 | //#endregion Links 115 | //#region Updating 116 | // "checkver": "regex", Match regex inside string on homepage 117 | // "checkver": "github", If homepage is set to github repo 118 | "checkver": { 119 | "url": "https://exampleurl.cz", 120 | "jsonpath": "$.cosi", 121 | "regex": "REGEXTOMATCH([\\d.]+)", 122 | "replace": "$1" 123 | }, 124 | "autoupdate": { 125 | "url": "https://ash258.com#/newName.zip", 126 | "hash": { // Some vendors do not ship hashes 127 | "url": "https://ash258.com", 128 | "regex": "do not write regexes for hash algorithms, use variables ($md5, $sha1, $sha256, $sha512, $checksum)" 129 | }, 130 | "note": "Note after autoupdate" 131 | } 132 | //#endregion Updating 133 | } 134 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Generic scoop bucket 2 | 3 | ❗❗🎉 Repository was converted into Template. See [blog](https://github.blog/2019-06-06-generate-new-repositories-with-repository-templates/?utm_campaign=1559837005&utm_medium=social&utm_source=twitter&utm_content=1559837005) for more information. 🎉❗❗ 4 | 5 | In this repository you will find everything you need to know about creating custom bucket with appveyor support. 6 | 7 | - [Files and helpers](#files-and-helpers) 8 | - [`bucket` Folder](#bucket-folder) 9 | - [`bin` Folder](#bin-folder) 10 | - [`Bucket.Tests.ps1` File](#buckettestsps1-file) 11 | - [`.vscode` Folder](#vscode-folder) 12 | - [`.github` Folder](#github-folder) 13 | - [`config files`](#config-files) 14 | - [How to use and adopt this bucket](#how-to-use-and-adopt-this-bucket) 15 | 16 | ## Files and helpers 17 | 18 | ### `bucket` Folder 19 | 20 | - All manifests belong here 21 | - `.gitkeep` file could be removed when you push your first manifest 22 | 23 | ### `bin` Folder 24 | 25 | Scripts which will save you time while debuging and writing manifests. 26 | If you need help how to use them just run `Get-Help .\bin\.ps1`. 27 | 28 | ### `Bucket.Tests.ps1` File 29 | 30 | - Test which are executed inside Appveyor pipeline 31 | - Could be configured as `pre_commit` hook 32 | 33 | ### `.vscode` Folder 34 | 35 | Contains all syntax highlighting, code formating, manifest creating tools you could use. 36 | 37 | - Extensions 38 | - All extensions which will save your time while writing manifests are in recommended sections 39 | - You will be notified about installing them when you open project 40 | - Settings 41 | - All settings are set to be compatible with Appveyor pipeline and upstream (official) repositories 42 | - No need to worry about formating restrictions between repositories. 43 | - Code snippets 44 | - > Code snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional-statements. 45 | - You could use workspace wide code snippets for speed up manifest creating 46 | - While editing json file write partitial name of snippet and press `tab` 47 | - Available Json snippets: 48 | - `app` 49 | - Create default manifest structure 50 | - `appArch` 51 | - Create default manifest structure with full acrchitecture 52 | - `arch` 53 | - Create only architecture property with 64bit and 32bit 54 | - `upAr` 55 | - Create autoupdate property with architecture 56 | - `persistCheck`, `persistInlineContent`, `persistInlineNoContent` 57 | - Installer / pre_install script for checking if file is already persisted or need to be created 58 | 59 | ### `.github` Folder 60 | 61 | GitHub repository configuration. 62 | 63 | - `workflows` folder 64 | - Linux (legacy) version [GitHub Actions](https://github.com/features/actions) configuration for automatic issue/PR/updates handling. 65 | - Windows version of actions could be used for better and future proof implementation (see for updated configs) 66 | - `CODEOWNERS` 67 | - Pull requests will request review for users defined in this file 68 | - `PULL REQUEST TEMPLATE` 69 | - Prefilled pull request types with proper titles 70 | - `ISSUE TEMPLATE` 71 | - The most used issue templates for users to select and prefilled with required information and labels 72 | 73 | ### `config files` 74 | 75 | - `.appveyor.yml` 76 | - Definition of Appveyor CI pipeline 77 | - `.editorconfig` 78 | - Universal configuration file, compatible with all types of editors 79 | - Defines how files should look 80 | - `.gitattributes` 81 | - Simplifying line endings for git 82 | - No need to configure `auto.clrf` setting on each clone or new workspaces 83 | - `Bucket.Tests.ps1` 84 | - Test which are executed inside Appveyor pipeline 85 | - Could be configured as `pre_commit` hook 86 | 87 | ## How to use and adopt this bucket 88 | 89 | 1. Click on `Use this template` to create new repository in your account with same files 90 | 1. Open project settings and **give your bucket in new name** 91 | 1. Add proper description of repository 92 | - Information about what type of manifests could be found here 93 | 1. Add `scoop-bucket` tag for repository 94 | - Your manifests will be automatically available at 95 | 1. Enable appveyor CI/CD 96 | 1. Register / Login to [Appveyor](https://ci.appveyor.com/login) 97 | 1. Click `New Project` 98 | 1. From Left Panel, choose your source control variant (Github) 99 | 1. From Right Panel, choose repository with bucket and click `+ Add` 100 | 1. 🎉 Project created and ready to build 🎉 101 | 1. Get Badge URL 102 | 1. Open Appveyor Project settings 103 | 1. Navigate to Badges 104 | 1. Copy `Branch Sample markdown code` snippet for further usage 105 | - Only master branch is better, since you can freely test in other branches and do not mystificate users 106 | - [You could use alternative styles](https://shields.io/category/build#styles) 107 | 1. Clone project into some folder 108 | - `git clone git@github.com:USER/REPO.git MyAwesomeBucket` 109 | - or 110 | - `git clone https://github.com/USER/REPO.git MyAwesomeBucket` 111 | 1. Open vscode with this clone 112 | - `code MyAwesomeBucket` 113 | 1. _[optional]_ Configure remote repository 114 | 1. `git remote add 'upstream' 'https://github.com/Ash258/GenericBucket.git'` 115 | - This step will allow you to synchronize changes with this template repository 116 | - If some changes are pushed into this repository and you want to reflect them into your bucket, you can simply do something like: 117 | - `git fetch --all` 118 | - `git checkout -B upstream-master -t upstream/master` 119 | - Do changes 120 | - `git merge master` or create PR in github 121 | 1. Create proper README.md 122 | 1. [Open this README in the browser for reference](https://github.com/Ash258/GenericBucket/tree/master/README.md) 123 | 1. Open `README.template.md` 124 | 1. Replace all `%%templatestring%%` with real and according values 125 | 1. Replace appveyor status badge with yours 126 | - See: 127 | 1. Override this README with completed `README.template.md` 128 | 1. Remove template `README.template.md` 129 | 1. Repository tweaks 130 | 1. Open `.github\CODEOWNERS` and change `@Ash258` to desired github username 131 | 1. Actions 132 | 1. Open each file in `.github\workflows` and change `youremail@email.com` with your email 133 | 1. Visit for more information 134 | 1. 🎉🎉 Everything set. High quality and automated bucket is ready for new users 🎉🎉 135 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "Check version (Whole repository)", 6 | "detail": "Execute checkver for each manifests ini each folder inside repository.", 7 | "type": "shell", 8 | "options": { 9 | "env": { 10 | "SCOOP_DEBUG": "true", 11 | }, 12 | }, 13 | "command": ".\\bin\\checkver.ps1", 14 | "args": [ 15 | "-Recurse", 16 | ], 17 | "presentation": { 18 | "echo": true, 19 | "reveal": "always", 20 | "focus": false, 21 | "panel": "shared", 22 | "showReuseMessage": false, 23 | }, 24 | "group": "test", 25 | "problemMatcher": [], 26 | }, 27 | { 28 | // Default (While opened file, Press CTRL+F9 / CTRL+SHIFT+B) 29 | "label": "Check and update (Actual)", 30 | "detail": "Custom version check with auto commit", 31 | "type": "shell", 32 | "options": { 33 | "env": { 34 | "SCOOP_DEBUG": "true", 35 | }, 36 | }, 37 | "command": ".\\bin\\checkAndPush.ps1", 38 | "args": [ 39 | "'${file}'", 40 | "${input:pickUpdateType}", 41 | "${input:pickCheckType}", 42 | ], 43 | "presentation": { 44 | "echo": true, 45 | "reveal": "always", 46 | "focus": false, 47 | "panel": "shared", 48 | "showReuseMessage": false, 49 | }, 50 | "problemMatcher": [], 51 | "runOptions": { 52 | "reevaluateOnRerun": false, 53 | }, 54 | "group": { 55 | "kind": "build", 56 | "isDefault": true, 57 | }, 58 | }, 59 | { 60 | "label": "Test", 61 | "detail": "Execute Pester tests in repository root directory.", 62 | "type": "shell", 63 | "command": ".\\bin\\test.ps1", 64 | "presentation": { 65 | "echo": true, 66 | "reveal": "silent", 67 | "focus": false, 68 | "panel": "shared", 69 | "showReuseMessage": false, 70 | }, 71 | "group": "test", 72 | "problemMatcher": [], 73 | }, 74 | { 75 | "label": "Missing Checkver", 76 | "detail": "Check if manifests have checkver and autoupdate properties.", 77 | "type": "shell", 78 | "command": ".\\bin\\missing-checkver.ps1; .\\bin\\missing-checkver.ps1 -dir \"TODO\"", 79 | "presentation": { 80 | "echo": true, 81 | "reveal": "silent", 82 | "focus": false, 83 | "panel": "shared", 84 | "showReuseMessage": false, 85 | }, 86 | "group": "test", 87 | "problemMatcher": [], 88 | }, 89 | { 90 | "label": "Push Auto-PR", 91 | "detail": "Execute checkver and push updated manifests.", 92 | "type": "shell", 93 | "options": { 94 | "env": { 95 | "SCOOP_DEBUG": "true", 96 | }, 97 | }, 98 | "command": ".\\bin\\auto-pr.ps1", 99 | "args": [ 100 | "-Push", 101 | ], 102 | "presentation": { 103 | "echo": true, 104 | "reveal": "always", 105 | "focus": false, 106 | "panel": "shared", 107 | "showReuseMessage": true, 108 | "clear": false, 109 | }, 110 | "problemMatcher": [], 111 | }, 112 | { 113 | "label": "Checkver Actual", 114 | "detail": "Check version of currently opened manifest.", 115 | "type": "shell", 116 | "options": { 117 | "env": { 118 | "SCOOP_DEBUG": "true", 119 | }, 120 | }, 121 | "command": ".\\bin\\checkver.ps1", 122 | "args": [ 123 | "-App", 124 | "'${fileBasenameNoExtension}'", 125 | "-Dir", 126 | "'${relativeFileDirname}'", 127 | "-Force", 128 | ], 129 | "presentation": { 130 | "echo": true, 131 | "reveal": "silent", 132 | "focus": false, 133 | "panel": "shared", 134 | "showReuseMessage": false, 135 | }, 136 | "problemMatcher": [], 137 | "runOptions": { 138 | "instanceLimit": 99, 139 | }, 140 | }, 141 | { 142 | "label": "Checkhashes Actual", 143 | "detail": "Check hashes of currently opened manifest.", 144 | "type": "shell", 145 | "options": { 146 | "env": { 147 | "SCOOP_DEBUG": "true", 148 | }, 149 | }, 150 | "command": ".\\bin\\checkhashes.ps1", 151 | "args": [ 152 | "-App", 153 | "'${fileBasenameNoExtension}'", 154 | "-Dir", 155 | "'${relativeFileDirname}'", 156 | "-Force", 157 | ], 158 | "presentation": { 159 | "echo": true, 160 | "reveal": "silent", 161 | "focus": false, 162 | "panel": "shared", 163 | "showReuseMessage": false, 164 | }, 165 | "problemMatcher": [], 166 | "runOptions": { 167 | "instanceLimit": 99, 168 | }, 169 | }, 170 | { 171 | "label": "Purge Uninstall Actual", 172 | "detail": "Uninstall currently opened manifest and remove persisted data.", 173 | "type": "shell", 174 | "options": { 175 | "env": { 176 | "SCOOP_DEBUG": "true", 177 | }, 178 | }, 179 | "command": "scoop", 180 | "args": [ 181 | "uninstall", 182 | "'${fileBasenameNoExtension}'", 183 | "-p", 184 | ], 185 | "presentation": { 186 | "echo": true, 187 | "reveal": "silent", 188 | "focus": false, 189 | "panel": "shared", 190 | "showReuseMessage": false, 191 | }, 192 | "problemMatcher": [], 193 | "runOptions": { 194 | "instanceLimit": 99, 195 | }, 196 | }, 197 | { 198 | "label": "Install Actual", 199 | "detail": "Install currently opened manifest.", 200 | "type": "shell", 201 | "options": { 202 | "env": { 203 | "SCOOP_DEBUG": "true", 204 | }, 205 | }, 206 | "command": "scoop", 207 | "args": [ 208 | "install", 209 | "'${file}'", 210 | ], 211 | "presentation": { 212 | "echo": true, 213 | "reveal": "silent", 214 | "focus": false, 215 | "panel": "shared", 216 | "showReuseMessage": false, 217 | }, 218 | "problemMatcher": [], 219 | "runOptions": { 220 | "instanceLimit": 99, 221 | }, 222 | }, 223 | { 224 | "label": "ReInstall Actual", 225 | "detail": "Uninstall (--purge) and install currently opened manifest.", 226 | "type": "shell", 227 | "options": { 228 | "env": { 229 | "SCOOP_DEBUG": "true", 230 | }, 231 | }, 232 | "dependsOn": [ 233 | "Purge Uninstall Actual", 234 | "Install Actual", 235 | ], 236 | "dependsOrder": "sequence", 237 | "presentation": { 238 | "echo": true, 239 | "reveal": "silent", 240 | "focus": false, 241 | "panel": "shared", 242 | "showReuseMessage": false, 243 | }, 244 | "problemMatcher": [], 245 | "runOptions": { 246 | "instanceLimit": 99, 247 | }, 248 | }, 249 | { 250 | "label": "Force Update Actual", 251 | "detail": "Update currently opened manifest.", 252 | "type": "shell", 253 | "options": { 254 | "env": { 255 | "SCOOP_DEBUG": "true", 256 | }, 257 | }, 258 | "command": "scoop", 259 | "args": [ 260 | "update", 261 | "'${fileBasenameNoExtension}'", 262 | "-f", 263 | ], 264 | "problemMatcher": [], 265 | "runOptions": { 266 | "instanceLimit": 99, 267 | "reevaluateOnRerun": false, 268 | }, 269 | }, 270 | ], 271 | "inputs": [ 272 | { 273 | "id": "pickUpdateType", 274 | "description": "Select how manifest should be updated.", 275 | "type": "pickString", 276 | "options": [ 277 | "-Update", 278 | "-ForceUpdate", 279 | ], 280 | "default": "-Update", 281 | }, 282 | { 283 | "id": "pickCheckType", 284 | "description": "Select what binary should be called. (checkver or checkhashes)", 285 | "type": "pickString", 286 | "options": [ 287 | "-Hashes:$false", 288 | "-Hashes", 289 | ], 290 | "default": "-Hashes:$false", 291 | }, 292 | ], 293 | } 294 | --------------------------------------------------------------------------------