Create symlink for Travis on Mac

Pip is called `pip2.7` in Travis' Mac image.  Our script already
had to deal with this, but did so by conditionalizing the name we
use in our scripts.  Rather than doing that, let's create a symlink
with the name `pip` so that everything can just use the good name.
This commit is contained in:
joeduffy 2018-02-24 09:28:55 -08:00
parent 153344354c
commit 4de49a8600

View file

@ -20,11 +20,9 @@ nvm install v6.10.2
*) echo "error: unknown host os $(uname)" ; exit 1;;
esac
PIP_CMD=pip
# On Travis, pip is called pip2.7
# On Travis, pip is called pip2.7, so alias it.
if [ "${TRAVIS_OS_NAME:-}" = "osx" ]; then
PIP_CMD=pip2.7
sudo ln -s $(which pip2.7) /usr/local/bin/pip
fi
echo "installing yarn ${YARN_VERSION}"
@ -34,7 +32,6 @@ nvm install v6.10.2
curl -L -o "$(go env GOPATH)/bin/dep" https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-${OS}-amd64
chmod +x "$(go env GOPATH)/bin/dep"
echo "installing Gometalinter ${GOMETALINTER_VERSION}"
curl -L "https://github.com/alecthomas/gometalinter/releases/download/v${GOMETALINTER_VERSION}/gometalinter-v${GOMETALINTER_VERSION}-${OS}-amd64.tar.bz2" | tar -jxv --strip-components=1 -C "$(go env GOPATH)/bin"
@ -53,7 +50,7 @@ nvm install v6.10.2
go get -v github.com/wadey/gocovmerge
echo "installing AWS cli ${AWSCLI_VERSION}"
${PIP_CMD} install --user "awscli==${AWSCLI_VERSION}"
pip install --user "awscli==${AWSCLI_VERSION}"
)
# If the sub shell failed, bail out now.