Move version code into separate file and set pbr version to 2014.1.0
This structure is used in most of the OpenStack projects. Change-Id: I60ca5999793215c0805703c34040b693c1c07596
This commit is contained in:
parent
340302bf33
commit
7c61d4bad7
|
@ -1,5 +1,6 @@
|
|||
[metadata]
|
||||
name = solum
|
||||
version = 2014.1.0
|
||||
summary = Solum is a Platform-as-a-Service for OpenStack
|
||||
description-file =
|
||||
README.rst
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import pbr.version
|
||||
|
||||
|
||||
__version__ = pbr.version.VersionInfo(
|
||||
'solum').version_string()
|
|
@ -15,14 +15,11 @@
|
|||
"""Solum specific config handling."""
|
||||
|
||||
from oslo.config import cfg
|
||||
import pbr.version
|
||||
|
||||
|
||||
_version_info = pbr.version.VersionInfo('solum')
|
||||
from solum import version
|
||||
|
||||
|
||||
def parse_args(argv, default_config_files=None):
|
||||
cfg.CONF(argv[1:],
|
||||
project='solum',
|
||||
version=_version_info.version_string(),
|
||||
version=version.version_string(),
|
||||
default_config_files=default_config_files)
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright 2013 - Noorul Islam K M
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import pbr.version
|
||||
|
||||
from solum.openstack.common import test
|
||||
from solum import version
|
||||
|
||||
|
||||
class VersionTestCase(test.BaseTestCase):
|
||||
"""Test cases for version code."""
|
||||
|
||||
def test_version_string(self):
|
||||
self.assertEqual(pbr.version.VersionInfo('solum').version_string(),
|
||||
version.version_string())
|
|
@ -0,0 +1,21 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright 2013 - Noorul Islam K M
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import pbr.version
|
||||
|
||||
|
||||
version_info = pbr.version.VersionInfo('solum')
|
||||
version_string = version_info.version_string
|
|
@ -8,4 +8,5 @@ sphinx>=1.1.2
|
|||
oslo.sphinx
|
||||
testrepository>=0.0.17
|
||||
testscenarios>=0.4,<0.5
|
||||
testtools>=0.9.32
|
||||
testtools>=0.9.32
|
||||
mock>=1.0
|
||||
|
|
Loading…
Reference in New Issue