Skip to content

Commit 5c7aa4e

Browse files
author
Keith
committed
Use curl for Chocolatey asset download
1 parent b5afab7 commit 5c7aa4e

6 files changed

Lines changed: 1652 additions & 1645 deletions

File tree

.council/active-bughunt.md

Lines changed: 785 additions & 785 deletions
Large diffs are not rendered by default.

.council/latest-candidate-counts.md

Lines changed: 841 additions & 841 deletions
Large diffs are not rendered by default.

.github/workflows/publish-chocolatey.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,28 @@ jobs:
3838
- name: Download Windows release asset
3939
env:
4040
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
shell: pwsh
41+
shell: bash
4242
run: |
43-
$ErrorActionPreference = "Stop"
44-
$Asset = "iptv-tunerr-${{ inputs.version }}-windows-amd64.zip"
45-
$DownloadDir = Join-Path $env:RUNNER_TEMP "chocolatey-assets"
46-
New-Item -ItemType Directory -Force -Path $DownloadDir | Out-Null
47-
Remove-Item -Force -ErrorAction SilentlyContinue (Join-Path $DownloadDir $Asset)
48-
gh release download "${{ inputs.version }}" `
49-
--repo "${{ github.repository }}" `
50-
--pattern $Asset `
51-
--dir $DownloadDir `
52-
--clobber
53-
if (-not (Test-Path (Join-Path $DownloadDir $Asset))) {
54-
throw "Expected release asset was not downloaded: $Asset"
55-
}
43+
set -euo pipefail
44+
asset="iptv-tunerr-${{ inputs.version }}-windows-amd64.zip"
45+
download_dir="${RUNNER_TEMP}/chocolatey-assets"
46+
mkdir -p "${download_dir}"
47+
rm -f "${download_dir}/${asset}"
48+
url="https://github.com/${{ github.repository }}/releases/download/${{ inputs.version }}/${asset}"
49+
auth_header=()
50+
if [[ -n "${GH_TOKEN:-}" ]]; then
51+
auth_header=(-H "Authorization: Bearer ${GH_TOKEN}")
52+
fi
53+
curl --fail --location --show-error --silent \
54+
--connect-timeout 20 \
55+
--max-time 180 \
56+
--retry 3 \
57+
--retry-all-errors \
58+
--retry-delay 2 \
59+
--output "${download_dir}/${asset}" \
60+
"${auth_header[@]}" \
61+
"${url}"
62+
test -s "${download_dir}/${asset}"
5663
5764
- name: Pack and push
5865
env:

docs/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ All notable changes to IPTV Tunerr are documented here. Repo: [github.com/snapet
1414
## [Unreleased]
1515

1616
### CI / Packaging
17-
- **Chocolatey metadata now covers moderation feedback:** the Chocolatey package template and publish workflow now set package owner, icon, package source, project source, docs, bug tracker, and release notes metadata, the install script points the explicit shim at the nested Windows executable path used by release ZIPs, and publishing now packs/pushes with .NET installed under runner temp on the existing Linux runner pool instead of waiting for an unavailable Windows runner. The Windows ZIP download also uses a runner-temp asset directory with `--clobber` so reused self-hosted workspaces cannot stall the publish.
17+
- **Chocolatey metadata now covers moderation feedback:** the Chocolatey package template and publish workflow now set package owner, icon, package source, project source, docs, bug tracker, and release notes metadata, the install script points the explicit shim at the nested Windows executable path used by release ZIPs, and publishing now packs/pushes with .NET installed under runner temp on the existing Linux runner pool instead of waiting for an unavailable Windows runner. The Windows ZIP download also uses a runner-temp asset directory plus timeout-bounded `curl` retries so reused self-hosted workspaces cannot stall the publish.
1818
- **COPR publishing now attempts configured fallback auth after token expiry:** the COPR workflow prepares Fedora GSSAPI fallback credentials even when token credentials are present, then retries COPR CLI calls with that fallback when COPR rejects the token as invalid or expired. The `v0.1.85` COPR channel was restored by rotating the API token; the fallback remains available for future token-expiry recovery.
1919
- **COPR SRPM publishing now uses the requested release version:** the COPR workflow builds SRPMs in an isolated temporary RPM topdir, copies the expected `iptvtunerr-${version}-1.src.rpm` into a relative `dist/` path, and uploads that explicit file instead of reusing persistent `~/rpmbuild` state on the self-hosted runner.
2020

memory-bank/current_task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
- Done: patched the Chocolatey nuspec/template metadata, added a controlled package icon asset, corrected the explicit Windows shim target, and made the publish workflow rewrite nuspec/install-script content before packing so existing release tags can be republished without moving tags.
77
- Done: after the first dispatch queued indefinitely because no online runner had the old `Windows` label, changed Chocolatey publishing to run on the repo Linux runner pool and pack/push with .NET/NuGet.
88
- Done: after the first Linux dispatch failed because setup-dotnet tried to write `/usr/share/dotnet` without permission, constrained the .NET install directory to runner temp.
9-
- Done: after the next Linux dispatch hung while downloading the release ZIP in a reused self-hosted workspace, made the asset download noninteractive by placing it under runner temp with `--clobber` and hashing that explicit path.
9+
- Done: after the next Linux dispatch hung while downloading the release ZIP in a reused self-hosted workspace, moved the asset download under runner temp and replaced `gh release download` with timeout-bounded `curl` retries; packing hashes that explicit path.
1010
- Done: updated release-channel docs and changelog with the Chocolatey moderation state and fix.
11-
- Verification: XML/SVG syntax checks, PowerShell parser checks, extracted workflow parser checks, simulated `Pack and push` workflow dry runs against old `v0.1.85` tag contents, local `dotnet pack` smoke for the Chocolatey nuspec, install-script shim-path stub test, `git diff --check`, local identity scan, and full `./scripts/verify` passed.
12-
- Next: commit/push the noninteractive asset-download follow-up, then dispatch `Publish Chocolatey` for the current release tag. If Chocolatey requires it, self-reject or ask the moderator to reject stale `0.1.68` first.
11+
- Verification: XML/SVG syntax checks, PowerShell parser checks, extracted workflow parser checks, extracted bash parser check, local curl download/checksum for the `v0.1.85` Windows ZIP, simulated `Pack and push` workflow dry runs against old `v0.1.85` tag contents, local `dotnet pack` smoke for the Chocolatey nuspec, install-script shim-path stub test, `git diff --check`, local identity scan, and full `./scripts/verify` passed.
12+
- Next: commit/push the timeout-bounded asset-download follow-up, then dispatch `Publish Chocolatey` for the current release tag. If Chocolatey requires it, self-reject or ask the moderator to reject stale `0.1.68` first.
1313

1414
**Current (2026-06-16):** Fix COPR publishing credentials and rerun `v0.1.85`.
1515

memory-bank/task_history.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,6 @@
425425
- Corrected `packaging/chocolatey/tools/chocolateyinstall.ps1` so the explicit shim target points at the nested release ZIP executable path, `iptv-tunerr-$releaseTag-windows-amd64\iptv-tunerr.exe`.
426426
- Hardened `.github/workflows/publish-chocolatey.yml` so the `Pack and push` step rewrites the full nuspec and install script at runtime before `choco pack`. This lets an existing tag such as `v0.1.85` be republished with corrected Chocolatey metadata even though the tag itself predates the packaging fix.
427427
- After commit `f09c6d5` was pushed, the first Chocolatey dispatch queued indefinitely because no online runner matched the old Windows runner labels. Canceled that queued run and changed Chocolatey publishing to the repo Linux runner pool, using `dotnet pack` against the nuspec and `dotnet nuget push` to publish the generated `.nupkg`. The first Linux dispatch reached `actions/setup-dotnet` but failed because it tried to install under `/usr/share/dotnet` without permission; the follow-up constrains `DOTNET_INSTALL_DIR` to runner temp.
428-
- A follow-up Linux dispatch then hung in the release ZIP download step on the reused self-hosted workspace, so the workflow now downloads the Windows ZIP into a runner-temp asset directory with `--clobber` and hashes that explicit file during packing.
428+
- A follow-up Linux dispatch then hung in the release ZIP download step on the reused self-hosted workspace, so the workflow now downloads the Windows ZIP into a runner-temp asset directory with timeout-bounded `curl` retries and hashes that explicit file during packing.
429429
- Updated the release-channel guide and changelog with the moderation state and remediation.
430430
- Verification: `xmllint` on the nuspec and SVG, PowerShell parser checks, extracted workflow parser checks after replacing GitHub expressions, simulated `Pack and push` dry run against old `v0.1.85` tag contents with a fake `choco`, local `dotnet pack` smoke for the Chocolatey nuspec, install-script shim-path stub test, `git diff --check`, local identity scan, and full `./scripts/verify` passed. `scripts/verify` regenerated tracked council scan files.

0 commit comments

Comments
 (0)