Commit 8334fb57 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Move update version to seperate script

parent d4b7f566
......@@ -131,7 +131,6 @@ def main():
" the changelog distribution to this value"
" (default=unstable).")
(options, args) = parser.parse_args()
if options.help:
......@@ -208,6 +207,9 @@ def main():
debian_version_from_python_version(python_version)
print_green("The new debian version will be: '%s'" % debian_version)
# Update the version files
python("update_version.py", _out=sys.stdout)
# Tag branch with python version
branch_tag = python_version
repo.git.tag(branch_tag, branch)
......@@ -242,17 +244,6 @@ def main():
debian_branch_tag = "debian/" + branch_tag
repo.git.tag(debian_branch_tag)
# Update the python version files
# TODO: remove this
for package in packages:
# python setup.py should run in its directory
cd(package)
package_dir = repo_dir + "/" + package
res = python(package_dir + "/setup.py", "sdist", _out=sys.stdout)
print res.stdout
if package != ".":
cd("../")
# Add version.py files to repo
call("grep \"__version_vcs\" -r . -l -I | xargs git add -f")
......
......@@ -42,15 +42,6 @@ from fnmatch import fnmatchcase
from setuptools import setup, find_packages
HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
try:
from devflow import versioning
# use devflow to update the version file
versioning.update_version('devflow', 'version', HERE)
except ImportError:
version_fpath = os.path.join(HERE, 'devflow', 'version.py')
sys.stdout.write("WARNING: Can not update version because `devflow` is"
" not installed. Please make sure to manually"
" update version file %s" % version_fpath)
from devflow.version import __version__
......
#Copyright (C) 2013 GRNET S.A. All rights reserved.
#
#Redistribution and use in source and binary forms, with or
#without modification, are permitted provided that the following
#conditions are met:
#
# 1. Redistributions of source code must retain the above
# copyright notice, this list of conditions and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
#THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
#OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
#WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
#PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
#CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
#USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
#AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
#LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
#ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
#POSSIBILITY OF SUCH DAMAGE.
#
#The views and conclusions contained in the software and
#documentation are those of the authors and should not be
#interpreted as representing official policies, either expressed
#or implied, of GRNET S.A.
import sys
import os
try:
from devflow import versioning
except ImportError:
raise RuntimeError("devflow is build dependency")
HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
def main():
versioning.update_version("devflow", "version", HERE)
if __name__ == "__main__":
sys.exit(main())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment