Skip to content

Conversation

Arpan-206
Copy link
Contributor

@Arpan-206 Arpan-206 commented Oct 19, 2025

Note

Adds a post-release job that updates the default CLI version in install.sh via an auto-generated PR and grants pull-requests write permission.

  • CI/CD (GitHub Actions):
    • Permissions: Add pull-requests: write to permissions in .github/workflows/publish.yml.
    • New job update-install-script (runs after goreleaser):
      • Checks out repo with bot token and extracts release version from tag.
      • Updates install.sh to set default CODECRAFTERS_CLI_VERSION to the new tag.
      • Detects changes and, if present, opens a PR using peter-evans/create-pull-request with versioned branch and auto-delete.

Written by Cursor Bugbot for commit 1672d3a. This will update automatically on new commits. Configure here.

Copy link

linear bot commented Oct 19, 2025

- name: Update install.sh
run: |
VERSION="${{ steps.version.outputs.version }}"
sed -i.bak "s/VERSION=\${CODECRAFTERS_CLI_VERSION:-v[0-9]*}/VERSION=\${CODECRAFTERS_CLI_VERSION:-$VERSION}/" install.sh
Copy link

Choose a reason for hiding this comment

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

Bug: Unescaped Version Variable in Sed Command

The sed command in the update-install-script job uses the $VERSION variable unescaped in its replacement string. This can cause the command to fail or incorrectly modify install.sh if the version tag contains sed special characters like /, &, or \.

Fix in Cursor Fix in Web

@Arpan-206 Arpan-206 requested a review from rohitpaulk October 21, 2025 12:11
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.

1 participant