EddyVerbruggen/nativescript-plugin-firebase

Feature Request: Add/Override additional environments for Google services files

Open

#1.515 aberto em 9 de dez. de 2019

Ver no GitHub
 (6 comments) (0 reactions) (0 assignees)TypeScript (429 forks)github user discovery
enhancementhelp wanted

Métricas do repositório

Stars
 (1.005 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Hi Eddy, I think it'd be handy to have a way to add additional Firebase environments, or override the defaults. Currently the plugin supports development and production environments, but other ones like staging or pre-production would be good too. I don't know if it's possible but a good place to control these might be in the firebase.nativescript.json file as an array of the the specified environments. These would correspond to the suffixes on the google-services.json and GoogleServices-Info.plist files.

Example

  • prod will be selected if you run with either the --release, --env.prod or --env.production flags
  • staging will be selected if you run with --env.staging (the environment string must match what is in the configuration array, filename and command-line arguments). If you combine --release with --env.staging. then staging would be selected and the app would be built as a release version.
  • dev will be selected if you do not run with any of the above flags
// in firebase.nativescript.json file
{
  ...
  "firebase_environments": [ "dev", "staging", "prod" ]
  ...
}

// above would map to:
// Android
//    google-services.json.dev
//    google-services.json.staging
//    google-services.json.prod

// iOS
//    GoogleServices-Info.plist.dev
//    GoogleServices-Info.plist.staging
//    GoogleServices-Info.plist.prod

Guia do colaborador