From ecc4dc852c8fd18bcf227b3970d02ee02857fabd Mon Sep 17 00:00:00 2001 From: Piotr Galar Date: Mon, 17 Oct 2022 11:30:32 +0200 Subject: [PATCH 1/4] ci: add no-check-choco-version input to the release workflow --- .github/workflows/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2097e74..04a1b14 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,11 @@ name: Release to Chocolatey on: workflow_dispatch: + inputs: + no-check-choco-version: + required: false + description: Disable version check in the Chocolatey community feed + default: "false" schedule: - cron: '0 0 * * *' @@ -45,6 +50,8 @@ jobs: - name: Install Dependencies run: choco install au - name: Build the latest release 🏗️ + env: + NoCheckChocoVersion: ${{ github.event.inputs.no-check-choco-version || 'false' }} run: | ./update.ps1 choco pack From c1d61575c12f2a43e8524daf353261a31e183bf7 Mon Sep 17 00:00:00 2001 From: Piotr Galar Date: Mon, 17 Oct 2022 11:33:26 +0200 Subject: [PATCH 2/4] fix: no-check-choco-version input default --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 04a1b14..b40f5d1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,6 @@ on: no-check-choco-version: required: false description: Disable version check in the Chocolatey community feed - default: "false" schedule: - cron: '0 0 * * *' @@ -51,7 +50,7 @@ jobs: run: choco install au - name: Build the latest release 🏗️ env: - NoCheckChocoVersion: ${{ github.event.inputs.no-check-choco-version || 'false' }} + NoCheckChocoVersion: ${{ github.event.inputs.no-check-choco-version }} run: | ./update.ps1 choco pack From 47952fb38354825ad3195da5f072f7a03c0a0bdc Mon Sep 17 00:00:00 2001 From: Piotr Galar Date: Mon, 17 Oct 2022 11:51:10 +0200 Subject: [PATCH 3/4] feat: parse NoCheckChocoVersion env var in update.ps1 --- go-ipfs/update.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/go-ipfs/update.ps1 b/go-ipfs/update.ps1 index fc43b1d..c203fc0 100644 --- a/go-ipfs/update.ps1 +++ b/go-ipfs/update.ps1 @@ -30,4 +30,9 @@ function global:au_GetLatest { return @{ Version = $version; URL32 = $url32; URL64 = $url64 } } -Update-Package -ChecksumFor none +if ([bool]::Parse($Env:NoCheckChocoVersion)) { + Update-Package -ChecksumFor none -NoCheckChocoVersion +} +else { + Update-Package -ChecksumFor none +} From fb2a19f502d01f92c7ff01378a692fbb37e7777c Mon Sep 17 00:00:00 2001 From: Piotr Galar Date: Mon, 17 Oct 2022 11:51:57 +0200 Subject: [PATCH 4/4] fix: no-check-choco-version input fallback --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b40f5d1..1bfe8c2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,7 +50,7 @@ jobs: run: choco install au - name: Build the latest release 🏗️ env: - NoCheckChocoVersion: ${{ github.event.inputs.no-check-choco-version }} + NoCheckChocoVersion: ${{ github.event.inputs.no-check-choco-version || 'False' }} run: | ./update.ps1 choco pack