gjaldon / heroku-buildpack-phoenix-static

A Heroku buildpack for building Phoenix's static assets
MIT License
230 stars 224 forks source link

Create `priv/static` dir if it does not exist #61

Closed OldhamMade closed 5 years ago

OldhamMade commented 7 years ago

Fixes a problem where deployment will fail is priv/static does not exist. This could be a potential issue for Phoenix-based API projects.

OldhamMade commented 7 years ago

mkdir -p is idempotent on its own. Could you remove the existence check please?

Sure, no problem.

Also, what exactly was failing? It may be better to fix that than to add a directory we don't need.

In my specific case, priv/static has been added to .gitignore but the deploy needs to still build the static version of any assets.

aaronjensen commented 7 years ago

In my specific case, priv/static has been added to .gitignore but the deploy needs to still build the static version of any assets.

Can you be more specific? Was it something in the compile scripts of this buildpack? Or was it something in phoenix like a mix task that is failing? I ask because if it's not something we're doing here, that is, it's something that phoenix expects to be there, then we should not work around it in the buildpack. You should probably add a .gitkeep to your priv/static in that case or contribute a fix to Phoenix instead. Of course, if it's something we're relying on here that we shouldn't be, then we should fix that instead.

gjaldon commented 5 years ago

Unclear whether this PR is necessary. Feel free to reopen