-
Notifications
You must be signed in to change notification settings - Fork 17
/
entrypoint.sh
executable file
·55 lines (45 loc) · 888 Bytes
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
set -e
cd ${13}
if [ -n "${11}" ]; then
apt-get update
apt-get -y upgrade
apt-get -y install --no-install-recommends ${11}
fi
if [ $1 != 'latest' ]; then
pyenv install $1
pyenv global $1
pyenv rehash
fi
if [ -z $8 ]; then
pre=""
else
pre="--pre"
fi
if [ $2 != 'latest' ]; then
pip install poetry$2 $pre
else
pip install poetry $pre
fi
if [ -n "${12}" ]; then
poetry self add ${12}
fi
poetry install ${7}
if [ -z $6 ]; then
poetry build
else
poetry build --format $6
fi
if [ -z $4 ] || [ -z $5 ]; then
poetry config pypi-token.pypi $3
poetry publish ${14}
else
if [ -z $9 ] || [ -z ${10} ]; then
poetry config pypi-token.$4 $3
poetry config repositories.$4 $5
poetry publish --repository $4 ${14}
else
poetry config repositories.$4 $5
poetry publish --repository $4 --username $9 --password ${10} ${14}
fi
fi