Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): Bump to version 0.2.0 #4896

Merged
merged 30 commits into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
af26d86
refactor(relpath): Use `$PSScriptRoot` instead of `relpath` (#4793)
niheaven Mar 9, 2022
60d308f
fix(scoop-prefix): Fix typo that breaks global installed apps (#4795)
niheaven Mar 9, 2022
a66a086
fix(installed): If no `$global`, check both local and global installe…
niheaven Mar 10, 2022
476b507
fix(update): Skip logs starting with `(chore)` (#4800)
rashil2000 Mar 10, 2022
5025661
fix(shim): Manipulating shims with UTF8 encoding (#4791)
chawyehsu Mar 10, 2022
5a795ca
refactor(reset_aliases): Move core function of `reset_aliases` to `sc…
niheaven Mar 11, 2022
635ae17
fix(shim): Correctly quote $@ in sh->ps1 shims (#4809)
e6c31d Mar 14, 2022
4d36cbd
fix(decompress): Fix tarball decompression (#4813)
chawyehsu Mar 17, 2022
53cdf68
fix(scoop-download): Add failure check (#4822)
tech189 Mar 18, 2022
5e4e6e9
doc(readme): Fix badges for Gitter and CI Tests (#4830)
rashil2000 Mar 21, 2022
45db5fb
feat(install): Allow downloading from private repositories (#4254)
tmsmith Mar 21, 2022
ad3fc4f
feat(config): Rename checkver_token to gh_token and SCOOP_CHECKVER_TO…
Mar 21, 2022
ced36b2
doc(scoop-shim): Fix typo (#4836)
rashil2000 Mar 22, 2022
32de4c5
refactor(bucket): Move 'Find-Manifest' and 'list_buckets' to 'buckets…
niheaven Mar 23, 2022
d29e336
fix(install): Fix Junction creation during installation inside contai…
kingster Mar 23, 2022
72fd0c5
docs(readme): Update installation instruction (#4825)
chawyehsu Mar 23, 2022
f441968
feat(config): Try SCOOP_GH_TOKEN value first before gh_token value fr…
Mar 26, 2022
55b26da
(chore): doc: Update PR checklist (#4851)
rashil2000 Mar 31, 2022
22c7d58
fix(shim-kiennq): Update shimexe file name (#4850)
kiennq Apr 1, 2022
f6679c2
build(schema): Remove 'description' from required fields (#4853)
niheaven Apr 2, 2022
47c0f46
feat(checkver): Add option to throw error as exception (#4867)
CrendKing Apr 14, 2022
f947b62
fix(test): Remove 'description' requirement (#4874)
niheaven Apr 15, 2022
7ee74a0
fix(scoop-list): Fix format specifier for minutes in date format (#4880)
cskrisz Apr 19, 2022
6296822
perf(scoop): Load libs only once (#4839)
niheaven Apr 21, 2022
e6d0371
fix(libs): Add missing 'json.ps1' dependency (#4884)
niheaven Apr 22, 2022
22365c2
fix(bucket): Return empty list correctly in `Get-LocalBucket` (#4885)
Apr 27, 2022
cb7cd99
docs(changelog): Rearrange CHANGELOG (#4897)
niheaven May 4, 2022
b96abcf
feat(scoop-cleanup): Add `-a/--all` switch to cleanup all apps (#4906)
niheaven May 7, 2022
0b6de90
feat(relicense): Relicense to dual-license (Unlicense or MIT) (#4903)
niheaven May 8, 2022
b93d0b4
docs(changelog): Bump to v0.2.0 (#4909)
niheaven May 8, 2022
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
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ Relates to #XXXX
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] I have read the [Contributing Guide](https://github.com/ScoopInstaller/.github/blob/main/.github/CONTRIBUTING.md).
- [ ] I have ensured that I am targeting the `develop` branch.
- [ ] I have updated the documentation accordingly.
- [ ] I have updated the tests accordingly.
- [ ] I have added an entry in the CHANGELOG.
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
## [Unreleased](https://github.com/ScoopInstaller/Scoop/compare/master...develop)

### Features

- **install:** Allow downloading from private repositories ([#4254](https://github.com/ScoopInstaller/Scoop/issues/4243))

### Bug Fixes

- **shim:** Manipulating shims with UTF8 encoding ([#4791](https://github.com/ScoopInstaller/Scoop/issues/4791), [#4813](https://github.com/ScoopInstaller/Scoop/issues/4813))
- **shim:** Correctly quote $@ in sh->ps1 shims ([#4808](https://github.com/ScoopInstaller/Scoop/issues/4808))
- **installed:** If no `$global`, check both local and global installed ([#4798](https://github.com/ScoopInstaller/Scoop/issues/4798))
- **scoop-list**: Fix date in 'Updated' column showing the months in the place of minutes ([#4880](https://github.com/ScoopInstaller/Scoop/pull/4880))
- **scoop-prefix:** Fix typo that breaks global installed apps ([#4795](https://github.com/ScoopInstaller/Scoop/issues/4795))
- **update:** Skip logs starting with `(chore)` ([#4800](https://github.com/ScoopInstaller/Scoop/issues/4800))
- **scoop-download:** Add failure check ([#4822](https://github.com/ScoopInstaller/Scoop/pull/4822))
- **install:** Fix issue with installation inside containers ([#4837](https://github.com/ScoopInstaller/Scoop/pull/4837))
- **bucket:** Return empty list correctly in `Get-LocalBucket` ([#4885](https://github.com/ScoopInstaller/Scoop/pull/4885))

### Performance Improvements

- **scoop:** Load libs only once ([#4839](https://github.com/ScoopInstaller/Scoop/issues/4839), [#4884](https://github.com/ScoopInstaller/Scoop/issues/4884))

### Code Refactoring

- **bucket:** Move 'Find-Manifest' and 'list_buckets' to 'buckets' ([#4814](https://github.com/ScoopInstaller/Scoop/issues/4814))
- **relpath:** Use `$PSScriptRoot` instead of `relpath` ([#4793](https://github.com/ScoopInstaller/Scoop/issues/4793))
- **reset_aliases:** Move core function of `reset_aliases` to `scoop` ([#4794](https://github.com/ScoopInstaller/Scoop/issues/4794))
- **config:** Rename checkver_token to gh_token and SCOOP_CHECKVER_TOKEN to SCOOP_GH_TOKEN ([#4832](https://github.com/ScoopInstaller/Scoop/pull/4832))
- **config:** try SCOOP_GH_TOKEN value first before gh_token value from config ([#4842](https://github.com/ScoopInstaller/Scoop/pull/4842))

### Builds

- **checkver:** Add option to throw error as exception ([#4863](https://github.com/ScoopInstaller/Scoop/issues/4863))
- **schema:** Remove 'description' from required fields ([#4853](https://github.com/ScoopInstaller/Scoop/issues/4853), [#4874](https://github.com/ScoopInstaller/Scoop/issues/4874))

### Documentation

- **readme:** Update installation instruction ([#4825](https://github.com/ScoopInstaller/Scoop/issues/4825))
- **readme:** Fix badges for Gitter and CI Tests ([#4830](https://github.com/ScoopInstaller/Scoop/issues/4830))
- **scoop-shim:**: Fix typo ([#4836](https://github.com/ScoopInstaller/Scoop/issues/4836))
niheaven marked this conversation as resolved.
Show resolved Hide resolved

## [v0.1.0](https://github.com/ScoopInstaller/Scoop/compare/2021-12-26...v0.1.0) - 2022-03-01

### Features
Expand Down
57 changes: 6 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
<a href="https://github.com/ScoopInstaller/Scoop">
<img src="https://img.shields.io/github/repo-size/ScoopInstaller/Scoop.svg" alt="Repository size" />
</a>
<a href="https://ci.appveyor.com/project/ScoopInstaller/Scoop">
<img src="https://ci.appveyor.com/api/projects/status/05foxatmrqo0l788?svg=true" alt="Build Status" />
<a href="https://github.com/ScoopInstaller/Scoop/actions/workflows/ci.yml">
<img src="https://github.com/ScoopInstaller/Scoop/actions/workflows/ci.yml/badge.svg" alt="Scoop Core CI Tests" />
</a>
<a href="https://discord.gg/s9yRQHt">
<img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
</a>
<a href="https://gitter.im/ScoopInstaller/Scoop">
<img src="https://badges.gitter.im/ScoopInstaller/Scoop.png" alt="Gitter Chat" />
<a href="https://gitter.im/lukesampson/scoop">
<img src="https://badges.gitter.im/lukesampson/scoop.png" alt="Gitter Chat" />
</a>
<a href="https://github.com/ScoopInstaller/Scoop/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/ScoopInstaller/Scoop.svg" alt="License" />
Expand Down Expand Up @@ -56,60 +56,15 @@ scoop install python ruby go perl

If you've built software that you'd like others to use, Scoop is an alternative to building an installer (e.g. MSI or InnoSetup) — you just need to zip your program and provide a JSON manifest that describes how to install it.

## Requirements

- Windows 7 SP1+ / Windows Server 2008+
- [PowerShell 5](https://aka.ms/wmf5download) (or later, include [PowerShell Core](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-6)) and [.NET Framework 4.5](https://www.microsoft.com/net/download) (or later)
- PowerShell must be enabled for your user account e.g. `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`

## Installation

Run the following command from your PowerShell to install scoop to its default location (`C:\Users\<user>\scoop`)
Run the following command from a **non-admin** PowerShell to install scoop to its default location `C:\Users\<YOUR USERNAME>\scoop`.

```powershell
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

# or shorter
iwr -useb get.scoop.sh | iex
```

Once installed, run `scoop help` for instructions.

The default setup is configured so all user installed programs and Scoop itself live in `C:\Users\<user>\scoop`.
Globally installed programs (`--global`) live in `C:\ProgramData\scoop`.
These settings can be changed through environment variables.

### Install Scoop to a Custom Directory by changing `SCOOP`

```powershell
$env:SCOOP='D:\Applications\Scoop'
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
# run the installer
```

### Configure Scoop to install global programs to a Custom Directory by changing `SCOOP_GLOBAL`

```powershell
$env:SCOOP_GLOBAL='F:\GlobalScoopApps'
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')
# run the installer
```

### Configure Scoop to store downloads to a Custom Directory by changing `SCOOP_CACHE`

```powershell
$env:SCOOP_CACHE='F:\ScoopCache'
[Environment]::SetEnvironmentVariable('SCOOP_CACHE', $env:SCOOP_CACHE, 'Machine')
# run the installer
```

### Configure Scoop to use a GitHub API token during searching and checkver by setting `SCOOP_CHECKVER_TOKEN`

```powershell
$env:SCOOP_CHECKVER_TOKEN='<paste-token-here>'
[Environment]::SetEnvironmentVariable('SCOOP_CHECKVER_TOKEN', $env:SCOOP_CHECKVER_TOKEN, 'Machine')
# search for an app
```
Advanced installation instruction and full documentation of the installer are available in [ScoopInstaller/Install](https://github.com/ScoopInstaller/Install). Please create new issues there if you have questions about the installation.

## [Documentation](https://github.com/ScoopInstaller/Scoop/wiki)

Expand Down
9 changes: 6 additions & 3 deletions bin/auto-pr.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
An array of manifests, which should be updated all the time. (-ForceUpdate parameter to checkver)
.PARAMETER SkipUpdated
Updated manifests will not be shown.
.PARAMETER ThrowError
Throw error as exception instead of just printing it.
.EXAMPLE
PS BUCKETROOT > .\bin\auto-pr.ps1 'someUsername/repository:branch' -Request
.EXAMPLE
Expand Down Expand Up @@ -54,7 +56,8 @@ param(
[Switch] $Request,
[Switch] $Help,
[string[]] $SpecialSnowflakes,
[Switch] $SkipUpdated
[Switch] $SkipUpdated,
[Switch] $ThrowError
)

. "$PSScriptRoot\..\lib\manifest.ps1"
Expand Down Expand Up @@ -160,11 +163,11 @@ if ($Push) {
execute "hub push origin $OriginBranch"
}

. "$PSScriptRoot\checkver.ps1" -App $App -Dir $Dir -Update -SkipUpdated:$SkipUpdated
. "$PSScriptRoot\checkver.ps1" -App $App -Dir $Dir -Update -SkipUpdated:$SkipUpdated -ThrowError:$ThrowError
if ($SpecialSnowflakes) {
Write-Host "Forcing update on our special snowflakes: $($SpecialSnowflakes -join ',')" -ForegroundColor DarkCyan
$SpecialSnowflakes -split ',' | ForEach-Object {
. "$PSScriptRoot\checkver.ps1" $_ -Dir $Dir -ForceUpdate
. "$PSScriptRoot\checkver.ps1" $_ -Dir $Dir -ForceUpdate -ThrowError:$ThrowError
}
}

Expand Down
19 changes: 13 additions & 6 deletions bin/checkver.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
Updated manifests will not be shown.
.PARAMETER Version
Update manifest to specific version.
.PARAMETER ThrowError
Throw error as exception instead of just printing it.
.EXAMPLE
PS BUCKETROOT > .\bin\checkver.ps1
Check all manifest inside default directory.
Expand Down Expand Up @@ -62,21 +64,22 @@ param(
[Switch] $Update,
[Switch] $ForceUpdate,
[Switch] $SkipUpdated,
[String] $Version = ''
[String] $Version = '',
[Switch] $ThrowError
)

. "$PSScriptRoot\..\lib\core.ps1"
. "$PSScriptRoot\..\lib\autoupdate.ps1"
. "$PSScriptRoot\..\lib\manifest.ps1"
. "$PSScriptRoot\..\lib\buckets.ps1"
. "$PSScriptRoot\..\lib\autoupdate.ps1"
. "$PSScriptRoot\..\lib\json.ps1"
. "$PSScriptRoot\..\lib\versions.ps1"
. "$PSScriptRoot\..\lib\install.ps1" # needed for hash generation
. "$PSScriptRoot\..\lib\unix.ps1"

$Dir = Resolve-Path $Dir
$Search = $App
$GitHubToken = $env:SCOOP_CHECKVER_TOKEN, (get_config 'checkver-token') | Where-Object -Property Length -Value 0 -GT | Select-Object -First 1
$GitHubToken = Get-GitHubToken

# don't use $Version with $App = '*'
if ($App -eq '*' -and $Version -ne '') {
Expand All @@ -102,7 +105,7 @@ Get-Event | ForEach-Object {
$Queue | ForEach-Object {
$name, $json = $_

$substitutions = Get-VersionSubstitution $json.version
$substitutions = Get-VersionSubstitution $json.version # 'autoupdate.ps1'

$wc = New-Object Net.Webclient
if ($json.checkver.useragent) {
Expand Down Expand Up @@ -334,9 +337,13 @@ while ($in_progress -gt 0) {
Write-Host 'Forcing autoupdate!' -ForegroundColor DarkMagenta
}
try {
Invoke-AutoUpdate $App $Dir $json $ver $matchesHashtable
Invoke-AutoUpdate $App $Dir $json $ver $matchesHashtable # 'autoupdate.ps1'
} catch {
error $_.Exception.Message
if ($ThrowError) {
throw $_
} else {
error $_.Exception.Message
}
}
}
}
2 changes: 1 addition & 1 deletion bin/refresh.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# for development, update the installed scripts to match local source
. "$PSScriptRoot\..\lib\core.ps1"

$src = relpath ".."
$src = "$PSScriptRoot\.."
$dest = ensure (versiondir 'scoop' 'current')

# make sure not running from the installed directory
Expand Down
61 changes: 44 additions & 17 deletions bin/scoop.ps1
Original file line number Diff line number Diff line change
@@ -1,29 +1,56 @@
#Requires -Version 5
param($cmd)
param($SubCommand)

Set-StrictMode -off
Set-StrictMode -Off

. "$PSScriptRoot\..\lib\core.ps1"
. "$PSScriptRoot\..\lib\buckets.ps1"
. "$PSScriptRoot\..\lib\commands.ps1"
. "$PSScriptRoot\..\lib\help.ps1"

reset_aliases
# for aliases where there's a local function, re-alias so the function takes precedence
$aliases = Get-Alias | Where-Object { $_.Options -notmatch 'ReadOnly|AllScope' } | ForEach-Object { $_.Name }
Get-ChildItem Function: | Where-Object -Property Name -In -Value $aliases | ForEach-Object {
Set-Alias -Name $_.Name -Value Local:$($_.Name) -Scope Script
}

$commands = commands
if ('--version' -contains $cmd -or (!$cmd -and '-v' -contains $args)) {
Write-Host "Current Scoop version:"
Invoke-Expression "git -C '$(versiondir 'scoop' 'current')' --no-pager log --oneline HEAD -n 1"
Write-Host ""
switch ($SubCommand) {
({ $SubCommand -in @($null, '--help', '/?') }) {
if (!$SubCommand -and $Args -eq '-v') {
$SubCommand = '--version'
} else {
exec 'help'
}
}
({ $SubCommand -eq '--version' }) {
Write-Host 'Current Scoop version:'
if ((Test-CommandAvailable git) -and (Test-Path "$PSScriptRoot\..\.git") -and (get_config SCOOP_BRANCH 'master') -ne 'master') {
Invoke-Expression "git -C '$PSScriptRoot\..' --no-pager log --oneline HEAD -n 1"
} else {
$version = Select-String -Pattern '^## \[(v[\d.]+)\].*?([\d-]+)$' -Path "$PSScriptRoot\..\CHANGELOG.md"
Write-Host $version.Matches.Groups[1].Value -ForegroundColor Cyan -NoNewline
Write-Host " - Released at $($version.Matches.Groups[2].Value)"
}
Write-Host ''

Get-LocalBucket | ForEach-Object {
$bucketLoc = Find-BucketDirectory $_ -Root
if(Test-Path (Join-Path $bucketLoc '.git')) {
Write-Host "'$_' bucket:"
Invoke-Expression "git -C '$bucketLoc' --no-pager log --oneline HEAD -n 1"
Write-Host ""
Get-LocalBucket | ForEach-Object {
$bucketLoc = Find-BucketDirectory $_ -Root
if ((Test-Path (Join-Path $bucketLoc '.git')) -and (Test-CommandAvailable git)) {
Write-Host "'$_' bucket:"
Invoke-Expression "git -C '$bucketLoc' --no-pager log --oneline HEAD -n 1"
Write-Host ''
}
}
}
({ $SubCommand -in (commands) }) {
if ($Args -in @('-h', '--help', '/?')) {
exec 'help' @($SubCommand)
} else {
exec $SubCommand $Args
}
}
default {
"scoop: '$SubCommand' isn't a scoop command. See 'scoop help'."
exit 1
}
}
elseif (@($null, '--help', '/?') -contains $cmd -or $args[0] -contains '-h') { exec 'help' $args }
elseif ($commands -contains $cmd) { exec $cmd $args }
else { "scoop: '$cmd' isn't a scoop command. See 'scoop help'."; exit 1 }
8 changes: 1 addition & 7 deletions lib/autoupdate.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<#
TODO
- clean up
#>
. "$PSScriptRoot\core.ps1"
. "$PSScriptRoot\json.ps1"

# Must included with 'json.ps1'
function find_hash_in_rdf([String] $url, [String] $basename) {
$data = $null
try {
Expand Down
Loading