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

Fix .gitignore for vendor/mzur #241

Merged
merged 2 commits into from
Feb 23, 2023
Merged

Conversation

medienbaecker
Copy link
Contributor

I noticed the plugin breaks Kirby installations when deployed via Git, because the .gitignore is not correct.

You ignore every folder in vendor with vendor/*, adding exceptions for mzur/kirby-form and mzur/kirby-flash. Sounds about right at first glance, but since the mzur folder does not exist, these exceptions don't work. With those folders missing, the whole Kirby installation breaks with the following error:

Failed opening required '/site/plugins/kirby-uniform/vendor/composer/../mzur/kirby-flash/src/helpers.php'

This PR fixes the deployment by adding an exception for the whole mzur folder.

@mzur
Copy link
Owner

mzur commented Feb 23, 2023

I don't understand this yet, sorry. So you say the mzur folder does not exist. How does the updated .gitignore change anything about it? Maybe it's easier for me to understand if you give me instructions for a minimal setup that demonstrates this issue (e.g. clone Kirby repo, add Uniform submodule, etc.). Thanks!

@medienbaecker
Copy link
Contributor Author

So you say the mzur folder does not exist. How does the updated .gitignore change anything about it?

Because instead of adding exceptions for its subfolders I added an exception for the folder itself. Maybe this Stack Overflow answer explains it better than I do: https://stackoverflow.com/a/16318111

Maybe it's easier for me to understand if you give me instructions

Nothing special really. Just push a Kirby installation including this plugin to a server or GitHub. This kind of deployment will respect the .gitignore which means it skips the vendor/mzur folder.

@mzur
Copy link
Owner

mzur commented Feb 23, 2023

Following your link, shouldn't the .gitignore look like this?

vendor/*
!vendor/composer
!vendor/mzur
vendor/mzur/*
!vendor/mzur/kirby-form
!vendor/mzur/kirby-flash

@medienbaecker
Copy link
Contributor Author

Yes, if you want to ignore the other folders inside vendor/mzur. I thought the two folders were the only ones.

Copy link
Owner

@mzur mzur left a comment

Choose a reason for hiding this comment

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

Alright, thanks! Right now there is nothing else than these two directories but the rules now match the intention to include the two directories and nothing else.

@mzur mzur merged commit 565f6b7 into mzur:master Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants