vmware-archive / clarity

Clarity is a scalable, accessible, customizable, open source design system built with web components. Works with any JavaScript framework, built for enterprises, and designed to be inclusive.
http://clarity.design
MIT License
6.43k stars 763 forks source link

only commit staged files (angular) #6545

Closed steve-haar closed 2 years ago

steve-haar commented 2 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

Currently, the update-license.js script will commit all modified files even if they are not staged. This is because the git diff command ends with a new line which is treated as an empty string and is interpreted as the entire directory.

Issue Number: N/A

What is the new behavior?

This PR makes it so that only staged changes would be committed.

Does this PR introduce a breaking change?

Other information

I wasn't expecting this behavior and it took me a bit to track down. I did see comments to stash and pop untracked changes. If this is a feature and desired behavior, then I would suggest maybe we move it to a different script file so the behavior can be more easily identified.

netlify[bot] commented 2 years ago

βœ”οΈ Deploy Preview for zzz-angular-clarity-design-old ready!

πŸ”¨ Explore the source changes: 0a8a29141538c2150fac3c8ea35ea244976e3bde

πŸ” Inspect the deploy log: https://app.netlify.com/sites/zzz-angular-clarity-design-old/deploys/61d4b832bf371300088789bc

😎 Browse the preview: https://deploy-preview-6545--zzz-angular-clarity-design-old.netlify.app