示例#1
0
    def index(self):
        data = {}

        if 'dev' in __version__:
            docs_url = 'http://docs.stackstorm.com/latest'
        else:
            docs_version = '.'.join(__version__.split('.')[:2])
            docs_url = 'http://docs.stackstorm.com/%s' % docs_version

        data['version'] = __version__
        data['docs_url'] = docs_url
        return data
示例#2
0
文件: root.py 项目: st2sandbox/st2
    def index(self):
        data = {}

        if "dev" in __version__:
            docs_url = "http://docs.stackstorm.com/latest"
        else:
            docs_version = ".".join(__version__.split(".")[:2])
            docs_url = "http://docs.stackstorm.com/%s" % docs_version

        data["version"] = __version__
        data["docs_url"] = docs_url
        return data
示例#3
0
文件: conf.py 项目: ipv1337/st2
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'StackStorm'
copyright = u'2014, StackStorm Inc'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# the __version__ is 0.8.1 or 0.9dev
# the version is short 0.8 version, to refer docs.
version = '.'.join(__version__.split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = __version__


def previous_version(ver):
    # XXX: on incrementing major version, minor version counter is lost!
    major, minor = ver.split('.')
    minor = int("".join(itertools.takewhile(str.isdigit, minor)))
    prev = minor - 1
    # Note(dzimine): work around CI/CD bug on v 0.10
    prev = 9 if prev == 10 else prev
    return ".".join([major, str(prev)])

# The short versions of two previous releases, e.g. 0.8 and 0.7
version_minus_1 = previous_version(version)
示例#4
0
# The encoding of source files.
# source_encoding = 'utf-8-sig'

# General information about the project.
project = info.project
copyright = info.copyright
author = info.author

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# the __version__ is 0.8.1 or 0.9dev
# the version is short 0.8 version, to refer docs.
version = '.'.join(__version__.split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = __version__
# The complete list of current StackStorm versions.
release_versions = ['2.5', '2.4', '2.3', '2.2', '2.1', '2.0', '1.6', '1.5', '1.4', '1.3', '1.2', '1.1', '0.13', '0.12', '0.11', '0.9', '0.8']

# Some loveliness that we have to do to make this work.  Otherwise it defaults to contents.rst
master_doc = info.master_doc


def previous_version(ver):
    if ver.endswith('dev'):
        return release_versions[0]
    major_minor = '.'.join(ver.split('.')[:2])
    if major_minor in release_versions:
        idx = release_versions.index(major_minor)