Programatically get release commit from `balena deploy`

I’m trying to do some scripting around balena deploy, and I’d like to be able to get the commit hash of the newly created commit. Is there any option better than teeing its output and grepping the resulting logfile?