skeet icon indicating copy to clipboard operation
skeet copied to clipboard

Add command to switch between development and production environment.

Open euledge opened this issue 1 year ago • 1 comments

For use cases where different Google cloud and firebase projects are created and deployed in production and staging environments, skeet can use the skeet init --login command to switch between them, but it is not possible to easily switch between them because each execution of this command will cause authentication to firebase. However, each time this command is executed, the user must authenticate to firebase, which makes it difficult to switch easily.

It would be useful to have a command to switch between these two definitions together in the skeet CLI.

Related Resources

  • https://firebase.google.com/docs/cli#project_aliases
  • https://cloud.google.com/sdk/gcloud/reference/config/configurations/

euledge avatar Dec 08 '23 18:12 euledge

Usage image after implementation

Skeet Profile Command manage develop environment profiles.

$ skeet help profile 
Usage: skeet profile [command]

Skeet Profile Command to add new profile or switch profile.

Command:
  add <profile name>   add  new profile
  use <profile name>   switch profile

Add Profile

Run the following command to add a profile for Google Cloud Project and Firebase Project.

$ skeet profile add
Usage: skeet profile add <profileName>

Arguments:
  profileName  Profile Name - e.g. dev

new profile will be created.

Use Profile

If you want to switch a profile to Google Cloud Project and Firebase Project, run the following command.

$ skeet profile use 
Usage: skeet profile use <profileName>

Arguments:
  profileName  Profile Name - e.g. dev

euledge avatar Dec 08 '23 18:12 euledge