18

I'm using Firebase Hosting for hosting a web app. I'm also hosting some small screencasts on the site, however every time I want to make a change to the app and deploy, I have to wait for the videos to be pushed.

Is there a way to selectively push changes to Firebase? Also, why does Firebase not simply push new/changed/touched files? I assume because its not doing any revision control for hosted applications and therefore isn't tracking such things, but that just makes the selective push much more of a need.

MandM
  • 3,293
  • 4
  • 34
  • 56
  • Hello, MandM. Your assumptions are correct. You have already discovered that Firebase does not selectively push changes, so yeah. "Why does Firebase not simply" is a feature request more than a question. – Kato Nov 07 '14 at 17:45
  • Correct, Firebase _automatically_ performing a selective push would be a feature request, but my original question was "_is_ there a way to selectively push (manually)" -- I assume your comment means that neither automatic or manual is available. – MandM Nov 07 '14 at 20:32
  • Correct, it's because (as you assumed) it's not doing any sort of revision control (yet). Hopefully integrating with cloud will bring some of these features :) – Kato Nov 07 '14 at 23:38
  • Actually, it looks like what I'm looking for is in the `.ignore` section of the firebase.json file (rather than being specified on the command line during a firebase deploy). – MandM Nov 12 '14 at 13:31

2 Answers2

8

Currently, Firebase is not performing any sort of revision control, so automatic ignoring of files that haven't been changed/touched is not an option. However, in firebase.json, one can specify files to ignore in the .ignore section.

I had been looking for more of a manual option to specify in the command line when performing a firebase deploy, but performing it in the firebase.json file probably makes more sense if one knows the file has not been changed or does not need re-deploying.

https://www.firebase.com/docs/hosting/guide/deploying.html

From the docs:

ignore

"ignore": [
  "firebase.json",
  "**/.*",
  "**/node_modules/**"
]

optional - The ignore setting is an optional parameter since v1.0.1 of firebase-tools that specifies files to ignore on deploy. It can take glob definitions the same way Git handles .gitignore.

MandM
  • 3,293
  • 4
  • 34
  • 56
  • 1
    and the files you ignore won't available any longer? – Fausto R. Apr 20 '16 at 20:07
  • 2
    @FaustoR., I'm glad you mentioned this. A while after posting the question/answer, I had the same thought that including the **ignore** may mean that, when pushing to Firebase hosting, those files would be deleted. However, I never circled back around to testing... if you find the answer (it'll still probably be a while before I get the time to test), feel free to update here. – MandM Apr 20 '16 at 20:46
  • 6
    Just tried this. *ignore* ensures the deployed site is equal to the set of non-ignored files. Effectively deleting the ignored files. – Synesso Jul 23 '17 at 22:36
1

I'm using WebStorm...I could never get the backgrounds or images in a gallery to upload or change...what I did was rename the files and have WebStorm refactor it...once I did that, gulp build and then firebase deploy seemed to fix it for me...I know it's a tad of a work-around, but this is silly it just won't push changes