Skip to content
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

chore: add script to automatically update plunker bundle #913

Closed

Conversation

devversion
Copy link
Member

@devversion devversion commented Jul 24, 2016

Adds a script to automatically update the plunker bundle by using the Angular CLI with Production Mode.

The firebase hosting will contain files:

  • HEAD_bundle.js (Latest Bundle for each commit)
  • 2.0.0-alpha.6 (Bundle for that tag)
  • etc.

Open Points:

  • When deploying to firebase, we overwrite the current hosting and loose the old bundles (like for tags)
    We need a way to pull the old files or find another approach for hosting

Please give some thoughts @jelbourn

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 24, 2016
@devversion devversion force-pushed the chore/plunker-update-bundle branch 2 times, most recently from 771f71e to 738aff3 Compare July 24, 2016 18:56

matrix:
fast_finish: true
Copy link
Member

Choose a reason for hiding this comment

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

I wish I had known this option existed long ago...

@jelbourn
Copy link
Member

Is there a way to only run this for master?

@jelbourn
Copy link
Member

@hansl can you review this PR?

* The bundle will be used to load a Plunker Demo of Angular Material 2.
*/

const spawn = require('child_process').spawnSync;
Copy link
Contributor

Choose a reason for hiding this comment

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

Name the function the same, so in this case spawnSync.

Copy link
Member Author

@devversion devversion Jul 25, 2016

Choose a reason for hiding this comment

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

@hansl @jelbourn Addressed your comments.

Is there a way to only run this for master?

Travis is actually only running in master. I'd not add that to the actual script (should stay generic)

branches:
  only:
  - master

Copy link
Contributor

Choose a reason for hiding this comment

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

That setting is only for branches. We still run this on every PR (including this one).

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah gotcha. I thought that Jeremy meant, that it shouldn't run in other branches. Will add a check for the environment variable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually we're creating a firebase for this right now, and we'll add the login key to Travis. We'll let you know what key to use :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Awesome! I'm available on Slack, if there're any questions (I got one :D).

When deploying to firebase, we overwrite the current hosting and loose the old bundles (like for tags)
We need a way to pull the old files or find another approach for hosting

@jelbourn
Copy link
Member

jelbourn commented Jul 26, 2016

Created a new firebase instance called material2-plnkr and added a token MATERIAL2_PLNKR_TOKEN to travis.

@hansl
Copy link
Contributor

hansl commented Jul 26, 2016

@devversion Use the environment variable MATERIAL2_PLNKR_TOKEN as a token for Firebase login. If that variable is not defined, it's a PR or a fork and the task should be ignored. Cheers!

@jelbourn
Copy link
Member

@hansl I think the way he's doing it know is fine; it's explicitly checking whether it is a PR

@devversion
Copy link
Member Author

Yeah I think both ways are actually fine. However I'll change it to address @hansl's comment :)

@jelbourn
Copy link
Member

jelbourn commented Aug 8, 2016

@hansl are you capturing this in your build changes?

@hansl
Copy link
Contributor

hansl commented Aug 8, 2016

No, but it should probably be a followup PR on it.

@jelbourn
Copy link
Member

@hansl @devversion can you two connect to update this based on the new build?

devversion added a commit to devversion/material2 that referenced this pull request Sep 10, 2016
* Gulp task to create a bundle, which includes all components and all Angular 2 packages
* Designed to run inside of the Plunker Template
* Task to deploy to firebase (as per angular#913)

Closes angular#913
@devversion
Copy link
Member Author

Going to replace this with a Gulp task #1222

@devversion devversion closed this Sep 10, 2016
@devversion devversion deleted the chore/plunker-update-bundle branch September 10, 2016 19:39
devversion added a commit to devversion/material2 that referenced this pull request Sep 20, 2016
* Gulp task to create a bundle, which includes all components and all Angular 2 packages
* Designed to run inside of the Plunker Template
* Task to deploy to firebase (as per angular#913)

Closes angular#913
devversion added a commit to devversion/material2 that referenced this pull request Sep 20, 2016
* Gulp task to create a bundle, which includes all components and all Angular 2 packages
* Designed to run inside of the Plunker Template
* Task to deploy to firebase (as per angular#913)

Closes angular#913
devversion added a commit to devversion/material2 that referenced this pull request Sep 22, 2016
* Gulp task to create a bundle, which includes all components and all Angular 2 packages
* Designed to run inside of the Plunker Template
* Task to deploy to firebase (as per angular#913)

Closes angular#913
devversion added a commit to devversion/material2 that referenced this pull request Sep 22, 2016
* Gulp task to create a bundle, which includes all components and all Angular 2 packages
* Designed to run inside of the Plunker Template
* Task to deploy to firebase (as per angular#913)

Closes angular#913
devversion added a commit to devversion/material2 that referenced this pull request Sep 23, 2016
* Gulp task to create a bundle, which includes all components and all Angular 2 packages
* Designed to run inside of the Plunker Template
* Task to deploy to firebase (as per angular#913)

Closes angular#913
devversion added a commit to devversion/material2 that referenced this pull request Oct 2, 2016
* Gulp task to create a bundle, which includes all components and all Angular 2 packages
* Designed to run inside of the Plunker Template
* Task to deploy to firebase (as per angular#913)

Closes angular#913
devversion added a commit to devversion/material2 that referenced this pull request Oct 3, 2016
* Gulp task to create a bundle, which includes all components and all Angular 2 packages
* Designed to run inside of the Plunker Template
* Task to deploy to firebase (as per angular#913)

Closes angular#913
devversion added a commit to devversion/material2 that referenced this pull request Oct 3, 2016
* Gulp task to create a bundle, which includes all components and all Angular 2 packages
* Designed to run inside of the Plunker Template
* Task to deploy to firebase (as per angular#913)

Closes angular#913
@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.

4 participants