Skip to content

Commit

Permalink
Introducing __version__ and __project__ variables
Browse files Browse the repository at this point in the history
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 kubernetes-client#317
  • Loading branch information
brejoc committed Aug 16, 2017
1 parent e2e422b commit 1054f10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kubernetes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions scripts/update-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."

0 comments on commit 1054f10

Please sign in to comment.