-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore(release): include manually updated aqua-registry entries in the changelog #7603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -243,9 +243,13 @@ fi | |||||
| mise run fetch-gpg-keys | ||||||
| mise run render ::: lint-fix | ||||||
|
|
||||||
| # Capture current aqua-registry package list before updating | ||||||
| # Capture current aqua-registry package list before updating (from the last tag) | ||||||
| OLD_AQUA_PKGS="" | ||||||
| if [[ -d crates/aqua-registry/aqua-registry/pkgs ]]; then | ||||||
| LATEST_TAG=$(git tag --list "v[0-9]*" --sort=-v:refname | head -1) | ||||||
|
|
||||||
| if [[ -n $LATEST_TAG ]]; then | ||||||
| OLD_AQUA_PKGS="$(git ls-tree -r --name-only "$LATEST_TAG" crates/aqua-registry/aqua-registry/pkgs | grep "/registry.yaml$" | sed 's|crates/aqua-registry/aqua-registry/pkgs/||;s|/registry.yaml||' | sort)" | ||||||
|
||||||
| OLD_AQUA_PKGS="$(git ls-tree -r --name-only "$LATEST_TAG" crates/aqua-registry/aqua-registry/pkgs | grep "/registry.yaml$" | sed 's|crates/aqua-registry/aqua-registry/pkgs/||;s|/registry.yaml||' | sort)" | |
| OLD_AQUA_PKGS="$(git ls-tree -r --name-only "$LATEST_TAG" crates/aqua-registry/aqua-registry/pkgs | grep "/registry.yaml$" | sed 's|crates/aqua-registry/aqua-registry/pkgs/||;s|/registry.yaml||' | sort || true)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script crashes when grep finds no matches
High Severity
The script uses set -euxo pipefail which causes it to exit if any pipeline command fails. When git ls-tree returns empty output (because crates/aqua-registry/aqua-registry/pkgs doesn't exist at the latest tag), grep "/registry.yaml$" receives no input and returns exit code 1. This causes the entire release script to crash. The previous code was safer because find returns exit code 0 even with no matches, and it only ran when the directory existed. Adding || true after grep would prevent this failure.
Uh oh!
There was an error while loading. Please reload this page.