Skip to content

Commit

Permalink
Normalize version
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
mdellweg committed Jun 19, 2024
1 parent c3d5998 commit d828b50
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions gen-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ LANGUAGE="${3:-python}"
PACKAGE="${4:-pulp_${COMPONENT//-/_}}"

DOMAIN_ENABLED="$(jq -r '.info."x-pulp-domain-enabled" // false' < "${API_SPEC}")"
VERSION="$(jq -r --arg component "$COMPONENT" '.info."x-pulp-app-versions"[$component]' < "${API_SPEC}")"

echo "Version: ${VERSION}"
[ "${VERSION}" != "none" ]
VERSION="$(jq -r --arg component "$COMPONENT" '.info."x-pulp-app-versions"[$component] // error("No version found.")' | python3 -c "from packaging.version import Version; print(Version(input()))" < "${API_SPEC}")"

OPENAPI_PYTHON_IMAGE="${OPENAPI_PYTHON_IMAGE:-docker.io/openapitools/openapi-generator-cli:v4.3.1}"
OPENAPI_RUBY_IMAGE="${OPENAPI_RUBY_IMAGE:-docker.io/openapitools/openapi-generator-cli:v4.3.1}"
Expand Down

0 comments on commit d828b50

Please sign in to comment.