mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 04:19:41 -08:00
fix: run post-install script
This commit is contained in:
parent
46fbf3d51c
commit
16e9fd2c6e
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -133,8 +133,8 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ needs.release.outputs.upload_url }}
|
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||||
asset_path: ${{ github.workspace }}/packages/scoop/oh-my-posh.json
|
asset_path: ${{ github.workspace }}/packages/scoop/scoop.json
|
||||||
asset_name: oh-my-posh.json
|
asset_name: scoop.json
|
||||||
asset_content_type: text/plain
|
asset_content_type: text/plain
|
||||||
- name: Upload Scoop Post Install
|
- name: Upload Scoop Post Install
|
||||||
id: upload-scoop-post-install
|
id: upload-scoop-post-install
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
Param
|
Param
|
||||||
(
|
(
|
||||||
[parameter(Mandatory=$true)]
|
[parameter(Mandatory = $true)]
|
||||||
[string]
|
[string]
|
||||||
$Version,
|
$Version,
|
||||||
[parameter(Mandatory=$true)]
|
[parameter(Mandatory = $true)]
|
||||||
[string]
|
[string]
|
||||||
$LinuxSHA,
|
$LinuxSHA,
|
||||||
[parameter(Mandatory=$true)]
|
[parameter(Mandatory = $true)]
|
||||||
[string]
|
[string]
|
||||||
$WindowsSHA
|
$WindowsSHA
|
||||||
)
|
)
|
||||||
|
|
||||||
$content = Get-Content '.\oh-my-posh.json' -Raw
|
$content = Get-Content '.\scoop.json' -Raw
|
||||||
$content = $content.Replace('<VERSION>', $Version)
|
$content = $content.Replace('<VERSION>', $Version)
|
||||||
$content = $content.Replace('<HASH_LINUX>', $LinuxSHA)
|
$content = $content.Replace('<HASH_LINUX>', $LinuxSHA)
|
||||||
$content = $content.Replace('<HASH_WINDOWS>', $WindowsSHA)
|
$content = $content.Replace('<HASH_WINDOWS>', $WindowsSHA)
|
||||||
$fileHash = Get-FileHash post-install.ps1 -Algorithm SHA256
|
$fileHash = Get-FileHash post-install.ps1 -Algorithm SHA256
|
||||||
$content = $content.Replace('<HASH_INSTALL_SCRIPT>', $fileHash.Hash)
|
$content = $content.Replace('<HASH_INSTALL_SCRIPT>', $fileHash.Hash)
|
||||||
$content | Out-File -Encoding 'UTF8' '.\oh-my-posh.json'
|
$content | Out-File -Encoding 'UTF8' '.\scoop.json'
|
||||||
|
|
|
@ -17,5 +17,5 @@
|
||||||
"<HASH_INSTALL_SCRIPT>"
|
"<HASH_INSTALL_SCRIPT>"
|
||||||
],
|
],
|
||||||
"bin": ["posh-linux-amd64", "posh-windows-amd64.exe"],
|
"bin": ["posh-linux-amd64", "posh-windows-amd64.exe"],
|
||||||
"post_install": "./post-install.ps1"
|
"post_install": "& \"$dir/post-install.ps1\""
|
||||||
}
|
}
|
Loading…
Reference in a new issue