Skip to content

Commit 5d3ab93

Browse files
author
rrahn
committed
Renames RTD_VERSION_SLUG to READTHEDOCS_VERSION
Adds another environment var for the project slug. Adds both to DockerEnvironment create_container function.
1 parent bd26b3b commit 5d3ab93

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

readthedocs/doc_builder/environments.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def run(self):
9090
environment.update(self.environment)
9191
environment['READTHEDOCS'] = 'True'
9292
if self.build_env is not None:
93-
environment['RTD_VERSION_SLUG'] = self.build_env.version.slug
93+
environment['READTHEDOCS_VERSION'] = self.build_env.version.slug
94+
environment['READTHEDOCS_PROJECT'] = self.build_env.project.slug
9495
if 'DJANGO_SETTINGS_MODULE' in environment:
9596
del environment['DJANGO_SETTINGS_MODULE']
9697
if 'PYTHONPATH' in environment:
@@ -541,6 +542,8 @@ def create_container(self):
541542
}
542543
}),
543544
detach=True,
545+
environment = {'READTHEDOCS_VERSION' : self.version.slug,
546+
'READTHEDOCS_PROJECT' : self.project.slug},
544547
mem_limit=self.container_mem_limit,
545548
)
546549
client.start(container=self.container_id)

0 commit comments

Comments
 (0)