forked from SignalOceanSdk/SignalSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
49 lines (43 loc) · 860 Bytes
/
release.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
#!/bin/bash -e
while [[ "$#" -gt 0 ]]
do
case $1 in
--repository-url)
repository_url="$2"
shift 2
;;
--username)
username="$2"
shift 2
;;
--password)
password="$2"
shift 2
;;
*)
shift
;;
esac
done
if [[ ! $repository_url ]]
then
echo 'Repository URL was not provided.'
exit 1
fi
if [[ ! $username ]]
then
echo 'Username was not provided.'
exit 1
fi
if [[ ! $password ]]
then
echo 'Password was not provided.'
exit 1
fi
if [[ ! -f ./env/bin/activate ]]
then
echo 'Virtual environment does not exist. Run build.sh to create it.'
exit 1
fi
source ./env/bin/activate
twine upload --repository-url "$repository_url" -u "$username" -p "$password" ./dist/*