Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Keep .gitignore files in sync #218

Merged
merged 1 commit into from
Dec 10, 2015
Merged

Conversation

ogizanagi
Copy link
Contributor

This is only a quick fix regarding the issue mentioned in #211 , and the few recent issues related:

@Pierstoval
Copy link
Contributor

So you just wrote the "raw" .gitignore files that are used in both 2.x and 3.x branches then, it sounds better 👍

@ogizanagi
Copy link
Contributor Author

@Pierstoval : Yes, and your comment also made me think the array syntax is useless now, so here is the nowdoc alternative.
Even if nothing is done about #211, it is then more straightforward to update.

@Pierstoval
Copy link
Contributor

I love this string format even if it looks a bit ugly in the first sight :D I'm 👍 on this

@javiereguiluz
Copy link
Member

I'm not sure about the new format. I think it's a bit ugly :(

@ogizanagi
Copy link
Contributor Author

@javiereguiluz: I can make those two ugly strings constants or dedicated files tonight if you think it's better. But I think the string format should be kept over the array entries for maintainability.

@ogizanagi
Copy link
Contributor Author

@javiereguiluz : PR updated with two new proposals:

  • 76b6b40 avoid ugly strings by adding both .gitignore files as resources in the phar archive (cannot let the leading dot, because box does not allow easily to not ignore dot files currently).
  • 0cd9785 retrieve .gitinore files directly from github. (If no connection available, it should generate an empty .gitignore file)
    IMHO, that's not the best option for the future, because I'd like to avoid extra HTTP requests, in case we add cache later, and allow to use the installer potentially without any connection.
    So it doesn't fully solve #211, and I still think those files should be part of the generated archives instead.

@javiereguiluz
Copy link
Member

@ogizanagi thanks for working on this. I like the last proposal that retrieves the .gitignore from GitHub.

In order to solve the original error, I'm trying to modify the build script to maintain the .gitignore file (see sensiolabs/SensioDistributionBundle#246). If this change gets approved, we'll have the .gitignore for new packages only, because the old packages won't be recreated.

That's why I ask you: should we add a check in your code to verify if the .gitignore file exists before trying to download it from GitHub? Thanks!

@weaverryan
Copy link
Member

👍 for your idea Javier. I was wondering (until you explained it) why we weren't just using the .gitignore from the SE.

@ogizanagi
Copy link
Contributor Author

@javiereguiluz: Done.

@ogizanagi ogizanagi changed the title Fix .gitignore file for the symfony 3 standard edition Keep .gitignore files in sync Dec 9, 2015
@javiereguiluz javiereguiluz merged commit 0da1b95 into symfony:master Dec 10, 2015
javiereguiluz added a commit that referenced this pull request Dec 10, 2015
This PR was merged into the 1.0-dev branch.

Discussion
----------

Keep .gitignore files in sync

This is only a quick fix regarding the issue mentioned in #211 , and the few recent issues related:

- #217
- symfony/symfony#16815

Commits
-------

0da1b95 Keep .gitignore files in sync
@ogizanagi ogizanagi deleted the gitignore_fix branch December 10, 2015 11:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants