Skip to content

chore(ci): replace fragile grep/awk version extraction with yq#14860

Open
pgragg wants to merge 1 commit intomainfrom
devin/1775765032-yq-version-extraction
Open

chore(ci): replace fragile grep/awk version extraction with yq#14860
pgragg wants to merge 1 commit intomainfrom
devin/1775765032-yq-version-extraction

Conversation

@pgragg
Copy link
Copy Markdown
Contributor

@pgragg pgragg commented Apr 9, 2026

Description

Replace a fragile grep/awk pattern for extracting the CLI version from versions.yml with a proper YAML query using yq (pre-installed on ubuntu-latest).

Changes Made

  • In the bulk-update-cli job, replaced:
    version=$(head -n 20 packages/cli/cli/versions.yml | grep -m 1 "version:" | awk '{print $3}')
    with:
    version=$(yq '.[0].version' packages/cli/cli/versions.yml)

Why: The old grep "version:" pattern also matches irVersion: lines (since "version:" is a substring). While grep -m 1 currently picks up the correct line because version: appears before irVersion: in each entry, this is order-dependent and fragile. Using yq properly parses the YAML and directly reads .[0].version.

Review Checklist

  • Confirm yq is pre-installed on ubuntu-latest runners (it is)
  • Confirm .[0].version matches the array-of-objects structure in packages/cli/cli/versions.yml

Testing

  • Manual review — this is a CI-only change that cannot be tested locally
  • No other jobs in this workflow use the same grep/awk pattern

Link to Devin session: https://app.devin.ai/sessions/7de29af33dd94752b8267744bbe3e89b
Requested by: @pgragg

Co-Authored-By: Timothy Gragg <pipergragg@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant