Add code to update an environment to an (optional) target version.