Lines Matching full:version
8 # Licensed under the Apache License, Version 2.0 (the "License");
29 import packaging.version
33 """ Shortcut to return the expanded version of an environment variable """
47 version = sanitize_version(ci_ver)
48 print('Git version: {}'.format(git_ver))
49 print('CI Version: {}'.format(ci_ver))
50 print('Deployment version: {}'.format(version))
52 if not version:
53 raise RuntimeError('A version is needed to deploy')
79 tarball_path, version_urls = build_doc_tarball(version, git_ver, build_dir)
81 deploy(version, tarball_path, docs_path, docs_server)
94 # process but call the version 'stable' this time
95 if is_stable_version(version):
96 print('Deploying again as stable version...')
101 def deploy(version, tarball_path, docs_path, docs_server): argument
107 # copy the version tarball to the server
115 'rm -rf ./*/{}'.format(version), # remove any pre-existing docs matching this version
120 # as the version will be invalid for a window of time. Better to do it atomically, but this is
121 … another thing made much more complex by the directory structure putting language before version...
124 def build_doc_tarball(version, git_ver, build_dir): argument
126 the given version """
128 tarball_path = '{}/{}.tar.gz'.format(build_dir, version)
138 symlinks = create_and_add_symlinks(version, git_ver, pdfs)
160 # when deploying, we want the top-level directory layout 'language/version/target'
161 archive_path = '{}/{}/{}'.format(language, version, target)
174 # when deploying, we want the layout 'language/version/target/pdf'
175 archive_path = '{}/{}/{}/{}'.format(language, version, target, pdf_filename)
185 def create_and_add_symlinks(version, git_ver, pdfs): argument
189 if 'stable' in version or 'latest' in version:
191 symlink_path = pdf_path.replace(git_ver, version)
201 def is_stable_version(version): argument
203 if not version.startswith('v'):
205 if '-' in version:
213 versions = [packaging.version.parse(v) for v in versions]
217 if max_version.public != version[1:]:
218 print('Stable version is v{}. This version is {}.'.format(max_version.public, version))
221 print('This version {} is the stable version'.format(version))