damccorm commented on issue #23851:
URL: https://github.com/apache/beam/issues/23851#issuecomment-1297082476

   A slightly cleaner approach than inspecting the output is probably to use 
the `quiet` flag and then inspect the exit code. There are usually tighter 
guarantees around exit codes than outputs. If there are changes, `git 
diff-index --quiet HEAD` will have an exit code of 1, if not it will have an 
exit code of 0.
   
   So if you do, for example, `git diff-index --quiet HEAD || (git add * && git 
commit -m "Message" && git push)`, the `add`, `commit`, and `push` steps will 
only run if there are changes. Alternatively, you can use the exec client we 
are already using to inspect the exit code of the command and then move the 
if/else logic into the javascript


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to