-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): Bump to version 0.2.0
Co-authored-by: Hsiao-nan Cheung <[email protected]> Co-authored-by: Rashil Gandhi <[email protected]> Co-authored-by: Rashil Gandhi <[email protected]> Co-authored-by: Chawye Hsu <[email protected]> Co-authored-by: Tyler887 <[email protected]> Co-authored-by: e6c31d <[email protected]> Co-authored-by: tech189 <[email protected]> Co-authored-by: Thad Smith <[email protected]> Co-authored-by: Alex Stelmachonak <[email protected]> Co-authored-by: Kinshuk Bairagi <[email protected]> Co-authored-by: kiennq <[email protected]> Co-authored-by: CrendKing <[email protected]> Co-authored-by: Krisztián Csordás <[email protected]> Co-authored-by: L. Yeung <[email protected]>
- Loading branch information
Showing
54 changed files
with
566 additions
and
514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.