Skip to content

Commit cdfd750

Browse files
committed
Fix snapshot version to be compliant with PEP440.
1 parent f4196f9 commit cdfd750

File tree

8 files changed

+14
-8
lines changed

8 files changed

+14
-8
lines changed

kubernetes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: release-1.26
7-
- Package version: 26.0.0-snapshot
7+
- Package version: 26.0.0+snapshot
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

1010
## Requirements.

kubernetes/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
__project__ = 'kubernetes'
1616
# The version is auto-updated. Please do not edit.
17-
__version__ = "26.0.0-snapshot"
17+
__version__ = "26.0.0+snapshot"
1818

1919
from . import client
2020
from . import config

kubernetes/client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from __future__ import absolute_import
1616

17-
__version__ = "26.0.0-snapshot"
17+
__version__ = "26.0.0+snapshot"
1818

1919
# import apis into sdk package
2020
from kubernetes.client.api.well_known_api import WellKnownApi

kubernetes/client/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7878
self.default_headers[header_name] = header_value
7979
self.cookie = cookie
8080
# Set default User-Agent.
81-
self.user_agent = 'OpenAPI-Generator/26.0.0-snapshot/python'
81+
self.user_agent = 'OpenAPI-Generator/26.0.0+snapshot/python'
8282
self.client_side_validation = configuration.client_side_validation
8383

8484
def __enter__(self):

kubernetes/client/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def to_debug_report(self):
350350
"OS: {env}\n"\
351351
"Python Version: {pyversion}\n"\
352352
"Version of the API: release-1.26\n"\
353-
"SDK Package Version: 26.0.0-snapshot".\
353+
"SDK Package Version: 26.0.0+snapshot".\
354354
format(env=sys.platform, pyversion=sys.version)
355355

356356
def get_host_settings(self):

scripts/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
KUBERNETES_BRANCH = "release-1.26"
1919

2020
# client version for packaging and releasing.
21-
CLIENT_VERSION = "26.0.0-snapshot"
21+
CLIENT_VERSION = "26.0.0+snapshot"
2222

2323
# Name of the release package
2424
PACKAGE_NAME = "kubernetes"

scripts/release.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
# branch
6262
#
6363
# Usage:
64-
# $ KUBERNETES_BRANCH=release-1.19 CLIENT_VERSION=19.0.0-snapshot DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
64+
# $ KUBERNETES_BRANCH=release-1.19 CLIENT_VERSION=19.0.0+snapshot DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
6565

6666
set -o errexit
6767
set -o nounset
@@ -94,6 +94,12 @@ KUBERNETES_BRANCH=${KUBERNETES_BRANCH:-$(python3 "scripts/constants.py" KUBERNET
9494
CLIENT_VERSION=${CLIENT_VERSION:-$(python3 "scripts/constants.py" CLIENT_VERSION)}
9595
DEVELOPMENT_STATUS=${DEVELOPMENT_STATUS:-$(python3 "scripts/constants.py" DEVELOPMENT_STATUS)}
9696

97+
# Simple check if version is compliant with https://peps.python.org/pep-0440/
98+
if [[ ! "$CLIENT_VERSION" =~ ^[0-9A-Za-z+.]+$ ]]; then
99+
echo "!!! Invalid client version $CLIENT_VERSION"
100+
exit 1
101+
fi
102+
97103
# Create a local branch
98104
STARTINGBRANCH=$(git symbolic-ref --short HEAD)
99105
declare -r STARTINGBRANCH

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# Do not edit these constants. They will be updated automatically
1818
# by scripts/update-client.sh.
19-
CLIENT_VERSION = "26.0.0-snapshot"
19+
CLIENT_VERSION = "26.0.0+snapshot"
2020
PACKAGE_NAME = "kubernetes"
2121
DEVELOPMENT_STATUS = "3 - Alpha"
2222

0 commit comments

Comments
 (0)