-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore: Remove usage of yq
in favor of jq
#369
Conversation
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
shellcheck
📝 [shellcheck] reported by reviewdog 🐶
Don't use variables in the printf format string. Use printf '..%s..' "$foo". SC2059
modules/modules/systemd/systemd.sh
Line 61 in 5008b92
unit=$(printf "$unit") |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
modules/modules/systemd/systemd.sh
Line 62 in 5008b92
systemctl --global -f enable $unit |
📝 [shellcheck] reported by reviewdog 🐶
Don't use variables in the printf format string. Use printf '..%s..' "$foo". SC2059
modules/modules/systemd/systemd.sh
Line 67 in 5008b92
unit=$(printf "$unit") |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
modules/modules/systemd/systemd.sh
Line 68 in 5008b92
systemctl --global disable $unit |
📝 [shellcheck] reported by reviewdog 🐶
Don't use variables in the printf format string. Use printf '..%s..' "$foo". SC2059
modules/modules/systemd/systemd.sh
Line 73 in 5008b92
unit=$(printf "$unit") |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
modules/modules/systemd/systemd.sh
Line 74 in 5008b92
systemctl --global unmask $unit |
📝 [shellcheck] reported by reviewdog 🐶
Don't use variables in the printf format string. Use printf '..%s..' "$foo". SC2059
modules/modules/systemd/systemd.sh
Line 79 in 5008b92
unit=$(printf "$unit") |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
modules/modules/systemd/systemd.sh
Line 80 in 5008b92
systemctl --global mask $unit |
[shellcheck] reported by reviewdog 🐶
modules/modules/rpm-ostree/rpm-ostree.sh
Line 72 in 5008b92
INSTALL_PKGS[$i]="${PKG//%OS_VERSION%/${OS_VERSION}}" |
Quote this to prevent word splitting. SC2046
modules/modules/rpm-ostree/rpm-ostree.sh
Line 115 in 5008b92
rpm-ostree override remove "${REMOVE_PKGS[@]}" $(printf -- "--install=%s " "${CLASSIC_PKGS[@]}") |
Quote this to prevent word splitting. SC2046
modules/modules/rpm-ostree/rpm-ostree.sh
Line 117 in 5008b92
rpm-ostree override remove "${REMOVE_PKGS[@]}" $(printf -- "--install=%s " "${CLASSIC_PKGS[@]}") |
Quote this to prevent word splitting. SC2046
modules/modules/rpm-ostree/rpm-ostree.sh
Line 120 in 5008b92
rpm-ostree override remove "${REMOVE_PKGS[@]}" $(printf -- "--install=%s " "${CLASSIC_PKGS[@]}") |
Quote this to prevent word splitting. SC2046
modules/modules/rpm-ostree/rpm-ostree.sh
Line 123 in 5008b92
rpm-ostree override remove "${REMOVE_PKGS[@]}" $(printf -- "--install=%s " "${CLASSIC_PKGS[@]}") |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
modules/modules/rpm-ostree/rpm-ostree.sh
Line 176 in 5008b92
rpm-ostree override replace --experimental --from "repo=copr:copr.fedorainfracloud.org:${MAINTAINER}:${REPO_NAME}" ${REPLACE_STR} |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
cat $REPO_INFO |
📝 [shellcheck] reported by reviewdog 🐶
Don't use variables in the printf format string. Use printf '..%s..' "$foo". SC2059
echo "Adding to $INSTALL_LEVEL flatpak installs: $(printf ${flatpak})" |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
echo "Adding to $INSTALL_LEVEL flatpak installs: $(printf ${flatpak})" |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
echo $flatpak >> $INSTALL_LIST |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
echo $flatpak >> $INSTALL_LIST |
📝 [shellcheck] reported by reviewdog 🐶
Don't use variables in the printf format string. Use printf '..%s..' "$foo". SC2059
echo "Adding to $INSTALL_LEVEL flatpak removals: $(printf ${flatpak})" |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
echo "Adding to $INSTALL_LEVEL flatpak removals: $(printf ${flatpak})" |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
echo $flatpak >> $REMOVE_LIST |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
echo $flatpak >> $REMOVE_LIST |
📝 [shellcheck] reported by reviewdog 🐶
Possible misspelling: FILES may not be assigned. Did you mean FILE? SC2153
modules/modules/files/files.sh
Line 18 in 5008b92
if [[ ${#FILES[@]} -gt 0 ]]; then |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
modules/modules/files/files.sh
Line 39 in 5008b92
cp -rf "$FILE"/* $DEST |
=~ is for regex, but this looks like a glob. Use = instead. SC2049
modules/modules/files/files.sh
Line 40 in 5008b92
if [[ "${DEST}" =~ *"/" ]] || [[ "${DEST}" == "/" ]]; then |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
modules/modules/files/files.sh
Line 51 in 5008b92
cp -f $FILE $DEST |
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086
modules/modules/files/files.sh
Line 51 in 5008b92
cp -f $FILE $DEST |
=~ is for regex, but this looks like a glob. Use = instead. SC2049
modules/modules/files/files.sh
Line 52 in 5008b92
if [[ "${DEST}" =~ *"/" ]] || [[ "${DEST}" == "/" ]]; then |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
It's populated in reverse order compared to the format in recipe, but it works
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.
Alright, I've combed through and it LGTM.
One concern; does this possible break some people's builds completely? I don't see jq
being included by ublue, but maybe it's included in base Fedora? But get_json_array
would still break at least the builds on the legacy template, but it's time to retire support for that anyways I guess, it should just come with an announcement. Including the jq
addition in some point releases for previous CLI releases could be a possibility, but maybe too overkill.
Only those in legacy templates & those with custom modules.
It's in base Fedora.
That would be good, also announcement for custom module users. They can just install
I would say it's overkill imo. |
Yeah, I guess I'll put a TODO for doing an announcement today, and then line all this up for merge. We could announce the CLI updates at the same time too. |
Fixes: #364, blue-build/cli#261