Skip to content

Added RTD_VERSION_SLUG environment variable. #1570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 22, 2015
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions readthedocs/doc_builder/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def run(self):
environment = {}
environment.update(self.environment)
environment['READTHEDOCS'] = 'True'
if self.build_env is not None:
environment['READTHEDOCS_VERSION'] = self.build_env.version.slug
environment['READTHEDOCS_PROJECT'] = self.build_env.project.slug
if 'DJANGO_SETTINGS_MODULE' in environment:
del environment['DJANGO_SETTINGS_MODULE']
if 'PYTHONPATH' in environment:
Expand Down Expand Up @@ -539,6 +542,8 @@ def create_container(self):
}
}),
detach=True,
environment = {'READTHEDOCS_VERSION' : self.version.slug,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed. The top part is the only bit that will run in prod.

Remove these lines, and I'll merge.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this was the thing that confused me if I should still provide this to the DockerEnvironment.

'READTHEDOCS_PROJECT' : self.project.slug},
mem_limit=self.container_mem_limit,
)
client.start(container=self.container_id)
Expand Down