Fix completions workflow
All checks were successful
/ build-artifacts (autoinstall) (push) Successful in 18s
/ build-artifacts (autostart-manage) (push) Successful in 16s
/ upload-release (push) Successful in 13s

This commit is contained in:
Tobias Reisinger 2024-01-12 02:40:58 +01:00
parent 6c2eeb4c9b
commit 5cc3d5144d
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 10 additions and 2 deletions

View file

@ -1,9 +1,9 @@
#!/usr/bin/env bash
pipe=${args[--pipe]:?}
completions=${args[--completions]:-}
target=${args[target]:?}
url=${args[url]:?}
completions=${args[completions]:-}
if [ "${action:-file}" = "exe" ]
then
@ -30,7 +30,7 @@ then
then
chmod +x "$target"
if [ -z "$completions" ]
if [ -n "$completions" ]
then
echo "Installing completions for $exe"
# shellcheck disable=SC2086

View file

@ -1,6 +1,7 @@
#!/usr/bin/env bash
group=${args[group]:?}
clean=${args[--clean]:-}
_config_query() {
tomlq -c --arg group "$group" \
@ -17,16 +18,23 @@ _config_query ".[]" | while read -r entry; do
target=$(echo "$entry" | jq -r '.target')
hook=$(echo "$entry" | jq -r '.hook // ""')
pipe=$(echo "$entry" | jq -r '.pipe // ""')
completions=$(echo "$entry" | jq -r '.completions // ""')
if [[ -n "$hook" ]]; then
install_args+=("--hook=$hook")
fi
if [[ -n "$clean" ]]; then
install_args+=("--clean")
fi
install_args+=("$type")
if [[ -n "$pipe" ]]; then
install_args+=("--pipe=$pipe")
fi
if [[ -n "$completions" ]]; then
install_args+=("--completions=$completions")
fi
if [[ $source = \$* ]]
then