Skip to content

Commit

Permalink
Declare and assign separately to avoid masking return values
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
dosas committed Nov 13, 2023
1 parent 30e72b6 commit d3eaa97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ PULP_URL="${PULP_URL}${PULP_API_ROOT}api/v3/"
# Download the schema
curl -k -o api.json "${PULP_URL}docs/api.json?bindings&plugin=$1"
# Get the version of the pulpcore or plugin as reported by status API
export DOMAIN_ENABLED=$(jq -r '.info | ."x-pulp-domain-enabled" // false' < api.json)
DOMAIN_ENABLED=$(jq -r '.info | ."x-pulp-domain-enabled" // false' < api.json)
export DOMAIN_ENABLED

if [ $# -gt 2 ];
then
Expand All @@ -61,7 +62,8 @@ else
COMPONENT_NAME=${1#"pulp_"}
fi

export VERSION=$(http ${PULP_URL}status/ | jq --arg plugin $COMPONENT_NAME -r '.versions[] | select(.component == $plugin) | .version')
VERSION=$(http ${PULP_URL}status/ | jq --arg plugin $COMPONENT_NAME -r '.versions[] | select(.component == $plugin) | .version')
export VERSION
fi

echo ::group::BINDINGS
Expand Down

0 comments on commit d3eaa97

Please sign in to comment.