Skip to content

build: script to build demo-app for firebase #4330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 4, 2017

Conversation

devversion
Copy link
Member

  • Adds a new gulp task that can be used to build the devapp in "deploy"-mode. This allows us to deploy the demo-app on firebase.

Fixes #3857

@devversion devversion requested a review from mmalerba April 29, 2017 11:22
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 29, 2017
@@ -28,3 +37,10 @@ task(':serve:devapp', serverTask(outDir, true));
task('serve:devapp', ['build:devapp'], sequenceTask(
[':serve:devapp', 'material:watch', ':watch:devapp']
));

/** Task that copies all vendors into the demo-app package. Allows hosting the app on firebase. */
task('build-deploy:devapp', ['build:devapp'], () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure about the name, I feel like it should be build:[something], build-deploy makes it sound like it's both building and deploying

Copy link
Member Author

Choose a reason for hiding this comment

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

How about prepare-deploy:devapp?

Copy link
Contributor

Choose a reason for hiding this comment

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

build:devapp-for-deploy?

@jelbourn any thoughts?

Copy link
Member Author

@devversion devversion Apr 29, 2017

Choose a reason for hiding this comment

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

Normally you have two different ways to do it:

  • [action]:[scope] (A few times like in this file)
  • [scope]:[action] (Most of the time)

It should be either one of these to not mix naming. At some point we will make all of those consistent anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you want to just pick a name for now we can go back and change it when we consistent-ify everything.

Copy link
Member Author

Choose a reason for hiding this comment

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

Named it prepare-deploy:devapp for now. Let's wait for @jelbourn's feedback before I apply merge ready.

@@ -28,3 +37,10 @@ task(':serve:devapp', serverTask(outDir, true));
task('serve:devapp', ['build:devapp'], sequenceTask(
[':serve:devapp', 'material:watch', ':watch:devapp']
));

/** Task that copies all vendors into the demo-app package. Allows hosting the app on firebase. */
task('prepare-deploy:devapp', ['build:devapp'], () => {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe just make it deploy:devapp and have it also run the firebase deploy? Anyone running this will almost certainly just run the deploy right after.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thought about doing that as well, but it looks like it would require me:

  • To specify a firebase project I want to deploy to (not very flexible then - from here)
  • And there would be the ugly goOffline() stuff (hope they improve it at some point..)

Do we have a firebase project we always want to use? If so I can use that one (but not flexible I think)

Copy link
Member

Choose a reason for hiding this comment

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

It shouldn't require specifying a firebase project. Typically someone will do firebase use xxx first.

I don't know what you mean by the goOffline() stuff

Copy link
Contributor

Choose a reason for hiding this comment

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

I use different ones since i like to have demos for different PRs going at the same time, maybe make it an argument? this looks promising: https://www.npmjs.com/package/yargs

Copy link
Member Author

Choose a reason for hiding this comment

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

@jelbourn Not sure, didn't try it with the Firebase-Tools API yet. Will try it later.

With the goOffline() stuff I meant that you manually need to "close" the firebase connection, because otherwise the Gulp task will run forever.

@mmalerba That would be an option, but sounds IMO a bit weird to parse arguments in an gulp task.

The advantage of having a task like prepare-deploy is, that we might want to make the demo-app "deploy-able", but don't want to publish it immediately. e.g when having the PR previews bot.

Let me see if I need to specify a firebase project.

Copy link
Member

Choose a reason for hiding this comment

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

@devversion we can still have the gulp task for just the build part- maybe stage:devapp? I just suspect people wouldn't need to use it much

Copy link
Member Author

Choose a reason for hiding this comment

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

@jelbourn @mmalerba Worked. Done with that.

* Adds a new gulp task that can be used to build the devapp in "deploy"-mode. This allows us to deploy the demo-app on firebase.

Fixes angular#3857
@devversion devversion force-pushed the build/deploy-devapp branch from aa9c1a6 to a3c5768 Compare May 2, 2017 18:21
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label May 3, 2017
@andrewseguin andrewseguin merged commit f8a2860 into angular:master May 4, 2017
@devversion devversion deleted the build/deploy-devapp branch November 11, 2017 10:20
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Firebase dev deployments don't work with beta.3 packaging changes
5 participants