You can probably fix the alias issues by putting the entire code block in an actual shell script and executing it in interactive bash with #!/bin/bash -ie as the interpeter line.
Yeah, I expect you're right. It splits up the build configuration even more though, so I'd only want to do that if I could store that script centrally somewhere. Artifactory doesn't provide a repo for shell scripts unfortunately ;)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.