vitessio / website

vitess.io website and other project management related content
https://vitess.io
Apache License 2.0
47 stars 187 forks source link

fail if there are no sync changes to commit instead of committing empty #1666

Closed ajm188 closed 5 months ago

ajm188 commented 5 months ago

this prevents us from creating unnecessary empty commits and better communicates when there were no changes to sync.

running the script twice in a row results in the following on the second run:

+ git add
Nothing specified, nothing added.
hint: Maybe you wanted to say 'git add .'?
hint: Turn this message off by running
hint: "git config advice.addEmptyPathspec false"
+ git checkout -- .
+ git add content/en content/zh
++ git diff --cached --name-only
++ wc -l
+ '[' 0 -eq 0 ']'
+ echo 'No changes to cobradocs detected'
No changes to cobradocs detected
+ exit 1
netlify[bot] commented 5 months ago

Deploy Preview for vitess ready!

Name Link
Latest commit a1c7661dafaa15f53149fcdc4e2bfe53b8b97584
Latest deploy log https://app.netlify.com/sites/vitess/deploys/65afceed575b560008d6f32b
Deploy Preview https://deploy-preview-1666--vitess.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.