-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupload_packages.sh
executable file
·57 lines (43 loc) · 1.48 KB
/
upload_packages.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
56
57
#! /bin/bash
################################################################################
#
# Copyright (C) 2020 Roland Jung, University of Klagenfurt, Austria.
#
# All rights reserved.
#
# This software is licensed under the terms of the MIT License, the full terms
# of which are made available in the LICENSE file.
#
# You can contact the author at [email protected]
#
################################################################################
CUR_DIR=${PWD}
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
VENV_DIR=${DIR}/python-venv
#bash update_submodules.sh
# create virtual environment
if [ ! -d "$VENV_DIR" ]; then
source setup-env.sh
fi
source ${VENV_DIR}/env/bin/activate
which python3
python3 -m pip install --upgrade build
python3 -m pip install --upgrade twine
echo "HINT: building and uploading all packages using twine"
echo "HINT: make sure you have setup the API token in /home/.pypirc !"
for file in "${DIR}"/pkgs/* ; do
#for file in "${DIR}"/pkgs//f_trajectory_evaluation ; do
if [[ -d "$file" && ! -L "$file" ]]; then
cd $file || return
echo "HINT: removing old dist and egg-info directory!"
rm -r dist
rm -r *.egg-info
echo "HINT: build and upload package usign twine..."
python3 -m build
# testpyi: python3 -m twine upload --repository testpypi dist/*
python3 -m twine upload dist/*
echo "HINT: removing new dist and egg-info directory!"
rm -r dist
rm -r *.egg-info
fi;
done