What is wrong with the following?
Clearly local variables persist across lines, as do aliases.
Yet the aliased command fails.
This is very hard to debug!!
if [[ “{CIRCLE_BRANCH}" == "master" || "{CIRCLE_BRANCH}” == “develop” ]]; then
image_tag=m-proc run-m-proc --version | tail -1
else
image_tag="0.1.${CIRCLE_BUILD_NUM}"
fi
alias docker_run=“docker run -e API_HOST_PROD=”{API_HOST_PROD}\"" alias docker_run "project-science:{image_tag}" upload --replace_current
alias docker_run=‘docker run -e API_HOST_PROD=“http://our.url”’
/bin/bash: line 9: docker_run: command not found
Exited with code 127