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

Update .gitignore #1678

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update .gitignore #1678

wants to merge 1 commit into from

Conversation

hos715
Copy link

@hos715 hos715 commented Jan 26, 2024

Make sure the ".env.server.example" file is visible to people

Description

Describe your PR! If it fixes specific issue, mention it with "Fixes # (issue)".

Select what type of change this PR introduces:

  1. Just code/docs improvement (no functional change).
  2. Bug fix (non-breaking change which fixes an issue).
  3. New feature (non-breaking change which adds functionality).
  4. Breaking change (fix or feature that would cause existing functionality to not work as expected).

Update Waspc ChangeLog and version if needed

If you did a bug fix, new feature, or breaking change, that affects waspc, make sure you satisfy the following:

  1. I updated ChangeLog.md with description of the change this PR introduces.
  2. I bumped waspc version in waspc.cabal to reflect changes I introduced, with regards to the version of the latest wasp release, if the bump was needed.

Make sure the ".env.server.example" file is visible to people
@Martinsos
Copy link
Member

Martinsos commented Jan 29, 2024

Thanks for the PR @hos715 !

The reason we put *.env.* is to protect people from accidentally committing .env.server that they might put in wrong place by accident. Or maybe they by accident call it .env.sevrer and that gets committed. So we went for a bit aggressive approach, ignoring just to be safe. People can easily edit .gitignore though, to be more permissive.

.env.server.example is quite common though, so it might make sense to allow for that.
How about we instead add explicit rule for that?

So instead of removing *.env.*, we could add:

!.env.server.example
!.env.client.example

Or even more general,

!*.env.*.example
!*.env.example

I am not 100% sure about those globs though, would be good to test them a bit.

@Martinsos
Copy link
Member

Thanks for the PR @hos715 !

The reason we put *.env.* is to protect people from accidentally committing .env.server that they might put in wrong place by accident. Or maybe they by accident call it .env.sevrer and that gets committed. So we went for a bit aggressive approach, ignoring just to be safe. People can easily edit .gitignore though, to be more permissive.

.env.server.example is quite common though, so it might make sense to allow for that. How about we instead add explicit rule for that?

So instead of removing *.env.*, we could add:

!.env.server.example
!.env.client.example

Or even more general,

!*.env.*.example
!*.env.example

I am not 100% sure about those globs though, would be good to test them a bit.

I tested these out, they all work well, so let's go with the last ones.

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