If you use shell_cmd in your sublime-build file, the command that you provide is passed directly to the shell on your operating system to execute as if you had typed it into a command prompt.
- 
cmd1 ; cmd2executescmd1followed bycmd2(for Windows, usecmd1 & cmd2instead)
- 
cmd1 && cmd2executescmd1and thencmd2ifcmd1succeeded
- 
cmd1 || cmd2executescmd1and thencmd2ifcmd1failed
Here success and failure relates to the value that the executed program returns, where success is 0 and failure is non-0. So you’d use the first case to just execute multiple commands and one of the others depending on whether you want to only proceed if previous steps succeeded.
At a guess you might want something like close ; make && reopen for this (or for windows, close & make && reopen), which would close the connection but continue executing even if there wasn’t an open connection, then build and reflash and re-open the connection if the build worked.