Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ project_name: workflow-plugin-security-scanner

before:
hooks:
- GOWORK=off go mod tidy
- "sed -i.bak -e 's/\"version\": \".*\"/\"version\": \"{{ .Version }}\"/' -e 's#/releases/download/v[^/]*/#/releases/download/v{{ .Version }}/#g' plugin.json && rm -f plugin.json.bak"
- sh -c "GOWORK=off go mod tidy"
- sh -c "sed -i.bak -e 's/\"version\": \".*\"/\"version\": \"{{ .Version }}\"/' -e 's#/releases/download/v[^/]*/#/releases/download/v{{ .Version }}/#g' plugin.json && rm -f plugin.json.bak"

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

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

PR description says only the GOWORK=off go mod tidy hook is wrapped in sh -c, but this change also wraps the sed ... plugin.json hook. If this is intentional, please update the PR description (or revert this line) so the change scope is clear for reviewers/release notes.

Copilot uses AI. Check for mistakes.

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

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

The sh -c "sed ..." hook now has multiple layers of quoting/escaping, which is easy to break when editing (and can be YAML-parsing sensitive around : sequences). Consider quoting the entire hook as a single YAML string (e.g., a single-quoted scalar or a |- block) and using single quotes for the sh -c argument to reduce escaping and make future edits safer.

Suggested change
- sh -c "sed -i.bak -e 's/\"version\": \".*\"/\"version\": \"{{ .Version }}\"/' -e 's#/releases/download/v[^/]*/#/releases/download/v{{ .Version }}/#g' plugin.json && rm -f plugin.json.bak"
- 'sh -c ''sed -i.bak -e '"'"'s/"version": ".*"/"version": "{{ .Version }}"/'"'"' -e '"'"'s#/releases/download/v[^/]*/#/releases/download/v{{ .Version }}/#g'"'"' plugin.json && rm -f plugin.json.bak'''

Copilot uses AI. Check for mistakes.

builds:
- id: default
Expand Down
Loading