Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

chore: add firebase project name to prompt #2743

Merged
merged 1 commit into from
Nov 4, 2016

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Nov 2, 2016

Remove project name from firebase.json, since that is deprecated.

The check-deploy gulp task now checks that an active project is defined at the start of check-deploy.

To set the active project use: firebase use <project-or-alias-name>.

Fixes #2576

cc @kwalrath

@chalin chalin changed the title chore: add firebase project name to prompt and support alt projects chore: add firebase project name to prompt Nov 2, 2016
@chalin chalin changed the title chore: add firebase project name to prompt [WIP] chore: add firebase project name to prompt Nov 3, 2016
Remove project name from firebase.json, since that is deprecated.

The `check-deploy` gulp task now checks that an active project is defined at the start of `check-deploy`.
To set the active project use: `firebase use <project-or-alias-name>`.

Fixes angular#2576
@chalin chalin force-pushed the chalin-adjust-deploy-prompt-1102 branch from f673338 to 567ebac Compare November 3, 2016 23:36
@chalin chalin changed the title [WIP] chore: add firebase project name to prompt chore: add firebase project name to prompt Nov 3, 2016
@chalin
Copy link
Contributor Author

chalin commented Nov 3, 2016

Best reviewed by ignoring whitespace.

prompt.start();
var schema = {
name: 'shouldDeploy',
description: 'Deploy to Firebase? (y/n)',
description: `Deploy ${WWW} to firebase? (y/n)`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

back ticks are really valid here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, its TS syntax for a string with interpolation (i.e., the ${WWW} inside the string).

} catch (e) {
// Rerun command so user gets project + alias info
execSync('firebase use', {stdio:[0,1,2]});
throw `\nAborting: no firebase project selected. Run:\n\n firebase use <project-or-alias-name>\n\n`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a little help on how to get the project-or-alias-name? Or an example of a name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what line 773 does. It generates output like:

No project is currently active.

Project aliases for /Users/chalin/git/angular.io:

  live (angular-io)
  ngdocsdev (ngdocsdev)
  kw-dev (kw-angular-io)
  dev (angular-io-dev)

Is that good enough?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's great.

@kwalrath
Copy link
Contributor

kwalrath commented Nov 4, 2016

LGTM. Thanks!

@kwalrath kwalrath merged commit e813fb4 into angular:master Nov 4, 2016
@chalin chalin deleted the chalin-adjust-deploy-prompt-1102 branch November 4, 2016 19:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants