def determine_version(self):
    with self.stage('Gathering Version') as s:
        pkg_info_path = os.path.join(self.project_path, PKG_ROOT, PKG_INFO)
        print('Reading version from {0}'.format(pkg_info_path))
        with open(pkg_info_path, 'r') as f:
            pkg_info_data = json.load(f)
        if ('version' not in pkg_info_data):
            return s.exit_with_error("'version' not found in {0}".format(pkg_info_path))
        else:
            self.vars.version = pkg_info_data['version']
            print('Found version is: {0}'.format(self.vars.version))
def determine_version(self):
    with self.stage('Gathering Version') as s:
        pkg_info_path = os.path.join(self.project_path, PKG_ROOT, PKG_INFO)
        print('Reading version from {0}'.format(pkg_info_path))
        with open(pkg_info_path, 'r') as f:
            pkg_info_data = json.load(f)
        if ('version' not in pkg_info_data):
            return s.exit_with_error("'version' not found in {0}".format(pkg_info_path))
        else:
            self.vars.version = pkg_info_data['version']
            print('Found version is: {0}'.format(self.vars.version))