fix(scoop): add executables to PATH

resolves #449
This commit is contained in:
Jan De Dobbeleer 2021-02-24 12:10:47 +01:00 committed by Jan De Dobbeleer
parent 58f1789415
commit 7377f31d70
3 changed files with 9 additions and 9 deletions

3
.gitignore vendored
View file

@ -150,5 +150,8 @@ dist
# linux binary
/src/oh-my-posh
package/
bin/
Output/
*.sha256
*.7z

View file

@ -5,16 +5,16 @@ Param
$Version
)
New-Item -Path "." -Name "bin" -ItemType Directory
Copy-Item -Path "../../themes" -Destination "./bin" -Recurse
New-Item -Path "." -Name "package/bin" -ItemType Directory
Copy-Item -Path "../../themes" -Destination "./package" -Recurse
# Download the files and pack them
@{name = 'posh-windows-amd64.exe'; outName = 'oh-my-posh.exe' }, @{name = 'posh-linux-amd64'; outName = 'oh-my-posh-wsl' } | ForEach-Object -Process {
$download = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$Version/$($_.name)"
Invoke-WebRequest $download -Out "./bin/$($_.outName)"
Invoke-WebRequest $download -Out "./package/bin/$($_.outName)"
}
$compress = @{
Path = "./bin/*"
Path = "./package/*"
CompressionLevel = "Fastest"
DestinationPath = "./posh-windows-wsl-amd64.7z"
}
@ -26,4 +26,4 @@ $content = $content.Replace('<HASH>', $zipHash.Hash)
$content | Out-File -Encoding 'UTF8' './oh-my-posh.json'
$zipHash.Hash | Out-File -Encoding 'UTF8' 'posh-windows-wsl-amd64.7z.sha256'
Remove-Item ./bin/ -Recurse
Remove-Item ./package/ -Recurse

View file

@ -12,10 +12,7 @@
"hash": "<HASH>"
}
},
"bin": [
"oh-my-posh-wsl",
"oh-my-posh.exe"
],
"env_add_path": "bin",
"checkver": {
"github": "https://github.com/JanDeDobbeleer/oh-my-posh"
},