Skip to content

Commit

Permalink
Merge pull request #99 from mdellweg/app_label
Browse files Browse the repository at this point in the history
Normalize version
  • Loading branch information
mdellweg authored Jun 19, 2024
2 parents c3d5998 + 84cc7dd commit 4b517f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gen-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ 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}")"

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

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 4b517f4

Please sign in to comment.