Reputation: 2453
I'm having a weird issue when pushing my app to heroku.
It's an angularjs
front app with a basic nodejs server to be able to run it on heroku.
I'm pushing a deployment branch with all the app already "compile" by grunt in a /dist
folder
My problem is in the /dist/public
directory, I have 4 folders : js
, css
, img
and fonts
; but after a push and checking on the dyno with heroku run bash
, only the img
one is in /dist/public
, the 3 others aren't there.
I try to do a new push, renaming the public
folder to another name (ie shared
) and this time, all 4 folders are there, so it seems heroku's doing something with folders named public but I can't figure why and how to avoid this suppression/ignoring thing.
Has any of you encountered the same issue, and how to resolve it without having to rename my public folder ?
EDIT :
Adding my .gitignore
file for those of you wondering about that:
/.vagrant/machines
/node_modules
/app/bower_components
/.sass-cache
/test
/app/src/lib/config.js
/dist
Upvotes: 1
Views: 1474
Reputation: 76887
Do a git add -f dist/public/js dist/public/css dist/public/fonts
from within your repo.
You have a .gitignore
rule for /dist
, which will ignore any files within /dist
and its subdirectories, unless they are already being tracked. My guess is, that the files you have newly generated were not being tracked earlier, and hence they were silently ignored.
The -f
flag in the git add above will add those forcefully (overriding the ignore rule), and so you will be able to make commits.
If there are only a few files, and you want to avoid adding the whole folders, I would suggest adding each of the individual files forcefully (i.e., with the -f
flag).
Upvotes: 4