Skip to content

Add natively a .keep file to empty directory to include on git committing #8830

Merged
andreslucena merged 2 commits intodevelopfrom
add-images-webpacker
Feb 16, 2022
Merged

Add natively a .keep file to empty directory to include on git committing #8830
andreslucena merged 2 commits intodevelopfrom
add-images-webpacker

Conversation

@microstudi
Copy link
Copy Markdown
Contributor

@microstudi microstudi commented Feb 16, 2022

🎩 What? Why?

When creating a decidim application from scratch (decidim my-app) it creates an empty directory in app/packs/images that is needed for webpacker to compile assets.

However, if you use git in combination with some tool to publish (ie capistrano) this directory is not tracked (unless you put some image in it) which leads to a assets:precompile error. At least it has been my experience.

This adds and empty file .keep into that directory to prevent this situation.

♥️ Thank you!

@microstudi
Copy link
Copy Markdown
Contributor Author

Sorry I didn't realized that there was a previous commit doing the same. Still this method does not relay on external tools (touch) so maybe is preferable. if not, just close this PR, thanks

@andreslucena
Copy link
Copy Markdown
Member

Sorry I didn't realized that there was a previous commit doing the same.

While reading the description, I was having a déjà vu 😅

It was introduced in #8786

Still this method does not relay on external tools (touch) so maybe is preferable.

Yes it is, specially for platforms that don't have the touch command like Windows (last time I've checked it didn't have one)

@andreslucena andreslucena changed the title Add an empty file to images dir and fix webpacker precompile Add natively a .keep file to empty directory to include on git committing Feb 16, 2022
@andreslucena andreslucena added module: generators type: fix PRs that implement a fix for a bug labels Feb 16, 2022
@andreslucena andreslucena merged commit 4cb4f73 into develop Feb 16, 2022
@andreslucena andreslucena deleted the add-images-webpacker branch February 16, 2022 16:40
@andreslucena
Copy link
Copy Markdown
Member

Can you please backport to v0.26-stable 🙏🏽? Thanks

@microstudi
Copy link
Copy Markdown
Contributor Author

backport comming

entantoencuanto added a commit that referenced this pull request Feb 18, 2022
* develop: (134 commits)
  Remove Rectify::Presenter references (#8758)
  Clarify the locales on the list of admins (#8838)
  Fix activity cell disappearing author images (#8826)
  Fix notifications when there is a note proposal in other spaces than processes (#8822)
  Fix accountability text search (#8831)
  Fix displaying hidden meetings in show process page (#8823)
  Fix docs for install-decidim.sh permissions (#8839)
  Fix report moderation for all the spaces (#8813)
  Clarify the comment at the resource search class (#8829)
  Fix displaying hidden related resources (#8812)
  Replace Decidim mentions in UI with 'the platform' (#8827)
  Add natively a .keep file to empty directory to include on git committing (#8830)
  Fix scope validation on initiative's creation (#8755)
  Replace `searchlight` with `ransack` which is already a core dependency (#8748)
  Fix characters not encoded in highlighted participatory process group title (#8820)
  Test ensuring the moderated comments are not computed in stats (#8816)
  Update rails to 6.0.4.6 and puma to 5.6.2 (#8817)
  Fix displaying hidden meetings in processes group's "upcoming meetings" content block (#8818)
  Fix displaying hidden meetings in homepage's "upcoming meetings" content block (#8809)
  Improve "Release Candidates" release docs (#8804)
  ...
@alecslupu alecslupu added this to the 0.27.0 milestone Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: generators type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants