Gets correct environment from app name for a deploy, eg. 'staging' from 'samewave-staging'