We can now build the CLI in a cross platform way (linux/mac/windows) all from the Makefile with relocatable VENV, DIST, and TOX directories. We can also optionally build in a docker container on platforms where docker is available.
28 lines
528 B
Bash
28 lines
528 B
Bash
set -o errexit -o nounset
|
|
if [ "$(uname)" != "Windows_NT" ]; then
|
|
set -o pipefail
|
|
fi
|
|
|
|
: ${PROMPT:="(dcos-cli) "}
|
|
|
|
: ${BUILDDIR:=$(pwd -P)}
|
|
: ${VENV:=env}
|
|
: ${DIST:=dist}
|
|
: ${TOX:=.tox}
|
|
: ${VENV_DOCKER:=env-docker}
|
|
: ${DIST_DOCKER:=dist-docker}
|
|
: ${TOX_DOCKER:=.tox-docker}
|
|
|
|
if [ "$(uname)" = "Windows_NT" ]; then
|
|
BIN=Scripts
|
|
EXE=.exe
|
|
: ${PYTHON:=python${EXE}}
|
|
: ${VIRTUALENV:=virtualenv${EXE}}
|
|
else
|
|
BIN=bin
|
|
EXE=
|
|
: ${PYTHON:=python3.5${EXE}}
|
|
fi
|
|
|
|
BASEDIR=$( cd "$(dirname $(dirname "${0}"))" > /dev/null; pwd -P )
|