Introducing __version__ and __project__ variables
Version information comes from scripts/constants.py and is hard-coded to kubernetes/__init__py by scripts/update-client.sh. __project__ is just hard-coded. Fixes #317
This commit is contained in:
parent
e2e422b72c
commit
1054f10c6d
@ -12,6 +12,10 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
__project__ = 'kubernetes'
|
||||
# The version is auto-updated. Please do not edit.
|
||||
__version__ = None
|
||||
|
||||
import kubernetes.client
|
||||
import kubernetes.config
|
||||
import kubernetes.watch
|
||||
|
||||
@ -62,6 +62,7 @@ mv "${CLIENT_ROOT}/swagger.json" "${SCRIPT_ROOT}/swagger.json"
|
||||
|
||||
echo ">>> updating version information..."
|
||||
sed -i'' "s/^CLIENT_VERSION = .*/CLIENT_VERSION = \\\"${CLIENT_VERSION}\\\"/" "${SCRIPT_ROOT}/../setup.py"
|
||||
sed -i'' "s/^__version__ = .*/__version__ = \\\"${CLIENT_VERSION}\\\"/" "${CLIENT_ROOT}/__init__.py"
|
||||
sed -i'' "s/^PACKAGE_NAME = .*/PACKAGE_NAME = \\\"${PACKAGE_NAME}\\\"/" "${SCRIPT_ROOT}/../setup.py"
|
||||
sed -i'' "s,^DEVELOPMENT_STATUS = .*,DEVELOPMENT_STATUS = \\\"${DEVELOPMENT_STATUS}\\\"," "${SCRIPT_ROOT}/../setup.py"
|
||||
echo ">>> Done."
|
||||
|
||||
Loading…
Reference in New Issue
Block a user