Commit 2c927dc4 by Arun Babu Neelicattu

Update release script to support freebsd builds

FreeBSD build environments cannot use `get-poetry.py` script as this
requires a release to be bootstrapped. These environments also do not
support Python 3.9 yet. This change ensures that non-linux
environments use `pip` to install poetry.

Resolves: #2815
parent 692294c5
#!/bin/sh #!/bin/sh
set -e set -ex
RUNTIMES[0]="${PYTHON27:+-P "2.7:$PYTHON27"}"
RUNTIMES[1]="${PYTHON35:+-P "3.5:$PYTHON35"}"
RUNTIMES[2]="${PYTHON36:+-P "3.6:$PYTHON36"}"
RUNTIMES[3]="${PYTHON37:+-P "3.7:$PYTHON37"}"
RUNTIMES[4]="${PYTHON38:+-P "3.8:$PYTHON38"}"
test -n "$PYTHON" || PYTHON="python3" test -n "$PYTHON" || PYTHON="python3"
$PYTHON get-poetry.py -y --preview
$PYTHON $HOME/.poetry/bin/poetry config virtualenvs.create false if [ "$OSTYPE" == "linux-gnu" ]; then
$PYTHON $HOME/.poetry/bin/poetry install --no-dev $PYTHON get-poetry.py -y --preview
$PYTHON $HOME/.poetry/bin/poetry run python sonnet make release \ POETRY="$PYTHON $HOME/.poetry/bin/poetry"
${PYTHON27:+-P "2.7:$PYTHON27"} \ RUNTIMES[5]="${PYTHON39:+-P "3.9:$PYTHON39"}"
${PYTHON35:+-P "3.5:$PYTHON35"} \ else
${PYTHON36:+-P "3.6:$PYTHON36"} \ $PYTHON -m pip install poetry -U --pre
${PYTHON37:+-P "3.7:$PYTHON37"} \ POETRY="$PYTHON -m poetry"
${PYTHON38:+-P "3.8:$PYTHON38"} \ fi
${PYTHON39:+-P "3.9:$PYTHON39"}
$POETRY config virtualenvs.create false
$POETRY install --no-dev
$POETRY run python sonnet make release ${RUNTIMES[@]}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment