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

Suggest not committing vendor directory in master, but having a dist branch to simplify development #42

Closed
AndrewFeeney opened this issue Sep 21, 2018 · 8 comments

Comments

@AndrewFeeney
Copy link
Contributor

AndrewFeeney commented Sep 21, 2018

It seems to me that those wishing to install and use this project are more likely to be people for whom composer will not be a difficulty, whereas everyone who works on development will be inconvenienced by commiting the vendor directory.

I suggest one of two options

  1. Commiting vendor in a separate dist branch specifically for those who want to download a ready to go build (i.e. shared hosting users etc.)

OR

  1. Moving development to a develop branch in which vendor is not committed and running an automated build process upon merge into master branch to resolve dependencies and commit them to master.
@freescout-helpdesk
Copy link
Owner

Agreed. Option 2 seems to be a better solution:

  1. We will create an extra develop branch and add /vendor directory to .gitignore in it.
  2. Contributors will use develop branch.
  3. master branch will continue having /vendor directory committed, it will be the default branch that people see when they visit project's Github page and download a ready to go build.

@dryabov
Copy link
Contributor

dryabov commented Sep 21, 2018

Another alternative is to move vendor into a submodule, but I've never tried it previously.

@freescout-helpdesk
Copy link
Owner

freescout-helpdesk commented Sep 21, 2018

GitHub flow recommends using branch called master as the base for forks.
So if we go with the option 1:

  1. We will create an extra dist branch and make it default, /vendor directory will be committed in this branch. It will be the default branch that people see when they visit project's Github page and download a ready to go build.
  2. Contributors will continue using master branch, where /vendor will be added to .gitignore

This seems to be a more natural workflow.

@freescout-helpdesk
Copy link
Owner

Another alternative is to move vendor into a submodule, but I've never tried it previously.

Moving vendor into submodule most likely will make contribution process more difficult.

@AndrewFeeney
Copy link
Contributor Author

GitHub flow recommends using branch called master as the base for forks.
So if we go with the option 1:

  1. We will create an extra dist branch and make it default, /vendor directory will be committed in this branch. It will be the default branch that people see when they visit project's Github page and download a ready to go build.
  2. Contributors will continue using master branch, where /vendor will be added to .gitignore

This seems to be a more natural workflow.

Sounds like a good plan.

@freescout-helpdesk
Copy link
Owner

Done. Development guide has been updated.

Now contributors need to do:

git pull
composer install

@freescout-helpdesk
Copy link
Owner

composer.lock file currently is not committed. It does make sense to commit it. It would allow to quickly install dependencies with composer install when switching between branches. It should not make any difficulties for developers: composer.lock just will need to be committed every time composer.json is changed.

@WebSpanner what do you think?

@AndrewFeeney
Copy link
Contributor Author

Yes, I think it's appropriate to commit the lock file.

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

No branches or pull requests

3 participants