From 16e9fd2c6eb3e158ff6902d70a5c9e487ed5cc1e Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Sun, 1 Nov 2020 11:44:26 +0100 Subject: [PATCH] fix: run post-install script --- .github/workflows/release.yml | 4 ++-- packages/scoop/build.ps1 | 10 +++++----- packages/scoop/{oh-my-posh.json => scoop.json} | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) rename packages/scoop/{oh-my-posh.json => scoop.json} (93%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee68c847..311077a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -133,8 +133,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/packages/scoop/oh-my-posh.json - asset_name: oh-my-posh.json + asset_path: ${{ github.workspace }}/packages/scoop/scoop.json + asset_name: scoop.json asset_content_type: text/plain - name: Upload Scoop Post Install id: upload-scoop-post-install diff --git a/packages/scoop/build.ps1 b/packages/scoop/build.ps1 index 2e6d81b8..7c058497 100644 --- a/packages/scoop/build.ps1 +++ b/packages/scoop/build.ps1 @@ -1,20 +1,20 @@ Param ( - [parameter(Mandatory=$true)] + [parameter(Mandatory = $true)] [string] $Version, - [parameter(Mandatory=$true)] + [parameter(Mandatory = $true)] [string] $LinuxSHA, - [parameter(Mandatory=$true)] + [parameter(Mandatory = $true)] [string] $WindowsSHA ) -$content = Get-Content '.\oh-my-posh.json' -Raw +$content = Get-Content '.\scoop.json' -Raw $content = $content.Replace('', $Version) $content = $content.Replace('', $LinuxSHA) $content = $content.Replace('', $WindowsSHA) $fileHash = Get-FileHash post-install.ps1 -Algorithm SHA256 $content = $content.Replace('', $fileHash.Hash) -$content | Out-File -Encoding 'UTF8' '.\oh-my-posh.json' +$content | Out-File -Encoding 'UTF8' '.\scoop.json' diff --git a/packages/scoop/oh-my-posh.json b/packages/scoop/scoop.json similarity index 93% rename from packages/scoop/oh-my-posh.json rename to packages/scoop/scoop.json index bb578c60..cbf2d3a0 100644 --- a/packages/scoop/oh-my-posh.json +++ b/packages/scoop/scoop.json @@ -17,5 +17,5 @@ "" ], "bin": ["posh-linux-amd64", "posh-windows-amd64.exe"], - "post_install": "./post-install.ps1" + "post_install": "& \"$dir/post-install.ps1\"" }