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

Maybe add a .composerignore? #8369

Closed
RolandHyden opened this issue Oct 10, 2019 · 9 comments

Comments

@RolandHyden
Copy link

commented Oct 10, 2019

Hi.
I have user Composer for long time to install repos in wordpress.
It works great.
But recently we have moved our repos from Github to Acure Devops.
It works fine, but... the .git-files is now included in the downloaded repo.
I have tried everyting, like archive - exclude, .gitattributes .git export-ignore, but nothing works.
The .git-files is still included.
Have anyone any ideas how to not include the .git-files when the repos are stored in Azure Devops?
Or, it is maybe possible to include a new file like .composerignore where it's possible to add files/folders that should not be included in the downloaded repo?
Best Regards
/Roland

...replace me...

When I run this command:

...replace me...

I get the following output:

...replace me...

And I expected this to happen:

@alcohol

This comment has been minimized.

Copy link
Member

commented Oct 10, 2019

https://git-scm.com/docs/gitattributes#_creating_an_archive should be universal for git. But the beauty is that github releases (tags) use this out of the box. I have no idea if Azure devops does this. This is not something we will implement in Composer however.

@alcohol alcohol closed this Oct 10, 2019
@alcohol alcohol added the Won't Fix label Oct 10, 2019
@stof

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2019

Thus, a .composerignore won't help here. The downloaded archive is not created by composer, but by Azure devops, so excluding something from the download needs to be done on their side.

@RolandHyden

This comment has been minimized.

Copy link
Author

commented Oct 10, 2019

Ok, thanks for your answers :)
I have sent an error report to Azure Devops to fix this.
The git-files SHOULD NOT be included in the release-tag (zip)

@RolandHyden

This comment has been minimized.

Copy link
Author

commented Oct 15, 2019

Hi again on you.
I have been in long discussion with Azure Devops around this issue and it seems that the problem maybe could be adressed to Composer.
The problem is that repos from Azure Devops is CLONED and then the .gil-files is included. Repos from Github is LOADED and then is not the .gil-files included.
I have tried to set preferred-install to dist and type to vcs but nothing works. Repos from Azure is CLONED and repos from Github is LOADED.
How do I do so all repos allways is LOADED? I have tried everyting but nothing works.
Or should the Azure-tema do anything on their side?
Best Regards
/Roland

@stof

This comment has been minimized.

Copy link
Contributor

commented Oct 15, 2019

hmm, indeed, composer does not have a specific VCS driver for Azure Devops to download dist archives generated by Azure devops, and so it fallbacks to the raw git driver.

We might need such a driver. However, a quick search does not let me think that Azure Devops has such "download source" endpoint as github or gitlab have.

@RolandHyden

This comment has been minimized.

Copy link
Author

commented Oct 16, 2019

Hi Stof.

Thanks for your reply. If I understand it correcttly there is now available VCS-driver för Azure Devops.
But then I have two questions. Hope that you could assist me with some answers.

A) Should the VCS-driver be hosted by Azure Devops and pe a part of the endpoint framework? Or should the VCS-driver be hosted by Composer and be a part of the Composer-installation?

B) Depending on the answer. Who should build the VCS-driver? Is it the Azure-team or the Composer-team?

I have been discussing this a lot with the Azure-team. They want to solve the problem. I mean, Microsoft owns Azure Devops and since lately they also owns Github. They wants happy customers :)

Best Regards
/Roland

@alcohol

This comment has been minimized.

Copy link
Member

commented Oct 16, 2019

Well, extending from our VCS driver we have specific implementations which you can find here:

https://github.com/composer/composer/tree/master/src/Composer/Repository/Vcs

The idea would be that someone writes an AzureDevops specific implementation. But that is only possible if they actually expose an API similar to Github, Gitlab et alia. It would take time to research how their API works and write the correct code necessary to use it. Sadly, time is one of the resources that the Composer team is quite short on.

@alcohol

This comment has been minimized.

Copy link
Member

commented Oct 16, 2019

If you want to go down this path however, I strongly recommend you open a new issue with a feature request (and if possible, links to documentation if available). We can tag it appropriately then and this will increase the odds of it being seen and picked up by someone in the future.

@RolandHyden

This comment has been minimized.

Copy link
Author

commented Oct 16, 2019

Ok, perfect. I will talk to the Azure-team and explain what the problem is and how the could solve it from their side.
Thanks for all help :)
I'l be back :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.