Skip to content

Update the process used by on_production() to determine whether or not the current branch is production #39

@hannesvz

Description

@hannesvz

In L421 of config.py the prod_branch variable is set based on whether or not the environment is called master.

Since Platform.sh now allows for renaming the default / production branch, this no longer produces an accurate value because it can be called anything (defaulting to main).

A more accurate way of determining whether or not the current branch is a production branch is to query the PLATFORM_ENVIRONMENT_TYPE environmental variable, which will return the correct environment type regardless of its name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions