Skip to content

update logic used by on_production() to determine if a branch is a production environment #40

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all 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
4 changes: 2 additions & 2 deletions platformshconfig/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ def on_production(self):

if not self.is_valid_platform() and not self.in_build():
return False
prod_branch = 'production' if self.on_dedicated() else 'master'
return self['BRANCH'] == prod_branch
platform_environment_type = os.environ['PLATFORM_ENVIRONMENT_TYPE']
return platform_environment_type == 'production'

def register_formatter(self, name, formatter):
"""Adds a credential formatter to the configuration.
Expand Down