Add check to prevent build of docs with bad version
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ jobs:
|
|||||||
dist: xenial
|
dist: xenial
|
||||||
sudo: required
|
sudo: required
|
||||||
- python: '3.6'
|
- python: '3.6'
|
||||||
env: TOXENV=docs
|
env: TOXENV=docs
|
||||||
- python: '3.6'
|
- python: '3.6'
|
||||||
env: TOXENV=djmaster
|
env: TOXENV=djmaster
|
||||||
- python: '3.6'
|
- python: '3.6'
|
||||||
|
|||||||
@@ -48,6 +48,11 @@ author = 'Cristi V.'
|
|||||||
|
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = get_distribution('drf_yasg').version
|
release = get_distribution('drf_yasg').version
|
||||||
|
if 'noscm' in release:
|
||||||
|
raise AssertionError('Invalid package version string: %s. \n'
|
||||||
|
'The documentation must be built with drf_yasg installed from a distribution package, '
|
||||||
|
'which must have been built with a proper version number (i.e. from a full source checkout).'
|
||||||
|
% (release,))
|
||||||
|
|
||||||
# The short X.Y.Z version.
|
# The short X.Y.Z version.
|
||||||
version = '.'.join(release.split('.')[:3])
|
version = '.'.join(release.split('.')[:3])
|
||||||
|
|||||||
Reference in New Issue
Block a user