This repository has been archived by the owner on Jul 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
prep_build_from_source.sh
executable file
·82 lines (71 loc) · 2.21 KB
/
prep_build_from_source.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
set -e
source $( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/vars
CLI=0
SDK=0
PLUGINS=0
LAB=0
IGNORE_TWINE_ERROR=1
for ARG in "$@"
do
case $ARG in
--cli)
CLI=1
shift # Remove --cli from processing
;;
--sdk)
SDK=1
shift # Remove --sdk from processing
;;
--plugins)
PLUGINS=1
shift # Remove --sdk from processing
;;
--lab)
LAB=1
shift # Remove --lab from processing
;;
--ignore-twine-error)
IGNORE_TWINE_ERROR=0
shift # Remove --ignore-twine-error from processing
;;
--all)
CLI=1
SDK=1
PLUGINS=1
LAB=1
shift # Remove --sdk from processing
;;
esac
done
${DIR}/set_jupyter_user_pip_conf.sh \
&& echo "Set jupyter-user pip.conf" \
|| (echo "ERROR: Failed to set jupyter-user pip.conf"; exit 1)
if [ $CLI -eq 1 ]; then
${DIR}/update_repo.sh cli ${DOMAIN} ${IGNORE_TWINE_ERROR} \
&& echo "Updated CLI codeartifact repository" \
|| (echo "ERROR: Failed to update CLI codeartifact repository"; exit 1)
fi
if [ $SDK -eq 1 ]; then
${DIR}/update_repo.sh sdk ${DOMAIN}-sdk ${IGNORE_TWINE_ERROR} \
&& echo "Updated SDK codeartifact repository" \
|| (echo "ERROR: Failed to update SDK codeartifact repository"; exit 1)
fi
if [ $LAB -eq 1 ]; then
${DIR}/update_repo.sh jupyterlab_orbit ${DOMAIN}-jupyterlab-orbit ${IGNORE_TWINE_ERROR} \
&& echo "Updated Jupyterlab-orbit codeartifact repository" \
|| (echo "ERROR: Failed to update Jupyterlab-orbit codeartifact repository"; exit 1)
fi
if [ $PLUGINS -eq 1 ]; then
# Adding plugins to Codeartifact
PLUGINS_DIR="${DIR}/../plugins"
ORBIT_PREFIX="aws-orbit-"
for module in `ls "${PLUGINS_DIR}"`
do
MODULE_NAME_FORMATTED=`echo ${module} | sed "s/_/-/g"`
MODULE_PKG="${ORBIT_PREFIX}${MODULE_NAME_FORMATTED}"
${DIR}/update_repo.sh plugins/"${module}" "${MODULE_PKG}" ${IGNORE_TWINE_ERROR} \
&& echo "Updated $module codeartifact repository" \
|| (echo "ERROR: Failed to update $module codeartifact repository"; exit 1)
done
fi