trailheadapps / dreamhouse-lwc

Sample application for Lightning Web Components on Salesforce Platform. Part of the sample gallery. Real estate use case. Get inspired and learn best practices.
https://developer.salesforce.com
Apache License 2.0
391 stars 779 forks source link

Add `sf deploy` options file to `.gitignore` #459

Closed cristiand391 closed 1 year ago

cristiand391 commented 1 year ago

What does this PR do?

Adds the sf CLI deploy options file to .gitignore

Context:

The sf deploy commands allows the user to save the deploy options in a deploy-options.json file. If you choose to save it, it writes it at the root of the sfdx project but the file shouldn't be commited to the project as it contains the org username, test level, etc:

{
  "Salesforce Apps": {
    "testLevel": "NoTestRun",
    "username": "test-hehehehe@example.com",
    "apps": [
      "force-app"
    ]
  }
}

What issues does this PR fix or reference?

N/A

The PR fulfills these requirements:

[ ] Tests for the proposed changes have been added/updated. [ ] Code linting and formatting was performed.

Functionality Before

After running sf deploy and saving the deploy opts, git complains about the untracked file.

Functionality After

I can save my deploy opts locally, git ignores it.

muenzpraeger commented 1 year ago

Good callout!

@pozil It looks like that the config files like .gitignore are not updated to what is set up for new projects.

muenzpraeger commented 1 year ago

For reference: https://github.com/forcedotcom/salesforcedx-templates/tree/main/src/templates/project

pozil commented 1 year ago

Thanks for letting us know @cristiand391. I'll keep this PR open for now but I'll need to apply this to all sample apps in a scripted update.

I'll also add .env since the CLI may use this in the future for the string replacement feature.

pozil commented 1 year ago

I aligned and updated .gitignore files for all sample apps. Thanks again for raising this issue.