Skip to content

Commit bb5a50a

Browse files
committed
Merge pull request #1570 from rrahn/feature/rtd_version_slug
Added RTD_VERSION_SLUG environment variable.
2 parents 391fbe2 + 370d885 commit bb5a50a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

readthedocs/doc_builder/environments.py

+5
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ def run(self):
111111
environment = {}
112112
environment.update(self.environment)
113113
environment['READTHEDOCS'] = 'True'
114+
if self.build_env is not None:
115+
environment['READTHEDOCS_VERSION'] = self.build_env.version.slug
116+
environment['READTHEDOCS_PROJECT'] = self.build_env.project.slug
114117
if 'DJANGO_SETTINGS_MODULE' in environment:
115118
del environment['DJANGO_SETTINGS_MODULE']
116119
if 'PYTHONPATH' in environment:
@@ -592,6 +595,8 @@ def create_container(self):
592595
},
593596
}),
594597
detach=True,
598+
environment={'READTHEDOCS_VERSION': self.version.slug,
599+
'READTHEDOCS_PROJECT': self.project.slug},
595600
mem_limit=self.container_mem_limit,
596601
)
597602
client.start(container=self.container_id)

0 commit comments

Comments
 (0)