Skip to content

Strip fourth version segment when downloading JQ binaries#93

Merged
kzu merged 3 commits intomainfrom
copilot/fix-jq-download-failure
Feb 16, 2026
Merged

Strip fourth version segment when downloading JQ binaries#93
kzu merged 3 commits intomainfrom
copilot/fix-jq-download-failure

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

The publish workflow fails when the release tag contains four segments (e.g., v1.8.1.1) because it attempts to download jq-1.8.1.1 from jqlang/jq, which only publishes three-segment versions.

Changes

Modified the download step to normalize version tags before downloading:

# Extract and normalize version: v1.8.1.1 → 1.8.1
JQ_VERSION="${JQVERSION##*/}"
JQ_VERSION="${JQ_VERSION#v}"
JQ_VERSION=$(echo "$JQ_VERSION" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+$/\1/')

This strips the fourth segment when present while preserving two- and three-segment versions unchanged (e.g., v1.71.7, v1.8.11.8.1).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/jqlang/jq/releases
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>If the release tag has four segments, ja download fails</issue_title>
<issue_description>The publish.yml workflow downloads the JQ binaries matching the version tag. But since we sometimes also ship nuget versions with an additional fourth revision number for C#-only updates, we need to fix the workflow to ignore that when downloading JQ.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 16, 2026 18:43
Co-authored-by: kzu <169707+kzu@users.noreply.github.com>
Co-authored-by: kzu <169707+kzu@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix JQ download failure for release tags with four segments Strip fourth version segment when downloading JQ binaries Feb 16, 2026
Copilot AI requested a review from kzu February 16, 2026 18:45
@kzu kzu marked this pull request as ready for review February 16, 2026 18:46
@kzu kzu enabled auto-merge (squash) February 16, 2026 18:49
@kzu kzu merged commit 1301e92 into main Feb 16, 2026
5 checks passed
@kzu kzu deleted the copilot/fix-jq-download-failure branch February 16, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If the release tag has four segments, ja download fails

2 participants