File tree 2 files changed +22
-8
lines changed
2 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 19
19
20
20
function exit_with_usage {
21
21
cat << EOF
22
- usage: $0 --version VERSION
23
-
22
+ usage: pack.sh --version VERSION --feature FEATURE
23
+ --feature FEATURE......a feature flag like --cuda, --arrow, etc ("none" for plain Daphne)
24
24
EOF
25
25
exit 1
26
26
}
@@ -29,8 +29,8 @@ if [ $# -eq 0 ]; then
29
29
exit_with_usage
30
30
fi
31
31
32
- DAPHNE_FEATURES=(" --arrow" " --cuda" )
33
32
DAPHNE_VERSION=-1
33
+ FEATURE=" "
34
34
35
35
while [[ $# -gt 0 ]]; do
36
36
key=$1
@@ -43,6 +43,10 @@ while [[ $# -gt 0 ]]; do
43
43
DAPHNE_VERSION=$1
44
44
shift
45
45
;;
46
+ --feature)
47
+ FEATURE=$1
48
+ shift
49
+ ;;
46
50
* )
47
51
unknown_options=" ${unknown_options} ${key} "
48
52
;;
@@ -59,9 +63,14 @@ if [[ "$DAPHNE_VERSION" == "-1" ]]; then
59
63
exit_with_usage
60
64
fi
61
65
62
- export PACK_ROOT=daphne-$DAPHNE_VERSION -bin
66
+ if [[ " $FEATURE " == " none" ]]; then
67
+ FEATURE=
68
+ fi
69
+
70
+ export PACK_ROOT=daphne$FEATURE -$DAPHNE_VERSION -bin
71
+ rm -rf bin build lib
63
72
64
- source build.sh ${DAPHNE_FEATURES[@]} --target all
73
+ source build.sh $FEATURE --target all
65
74
66
75
# shellcheck disable=SC2154
67
76
if [ -d " $daphneBuildDir " /venv ]; then
81
90
82
91
# shellcheck disable=SC2154
83
92
cd " $projectRoot "
84
- source test.sh ${DAPHNE_FEATURES[@]}
93
+
94
+ source test.sh ${FEATURE}
85
95
86
96
# shellcheck disable=SC2181
87
97
if [[ $? == 0 ]]; then
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ ARTIFACT_PATH=""
47
47
DAPHNE_REPO_URL=" git@github.com:corepointer/daphne.git"
48
48
# real URL:
49
49
# DAPHNE_REPO_URL="git@github.com:daphne-eu/daphne.git"
50
-
50
+ FEATURE= " "
51
51
while [[ $# -gt 0 ]]; do
52
52
key=$1
53
53
shift
@@ -59,6 +59,10 @@ while [[ $# -gt 0 ]]; do
59
59
DAPHNE_VERSION=$1
60
60
shift
61
61
;;
62
+ --feature)
63
+ FEATURE=$1
64
+ shift
65
+ ;;
62
66
--githash)
63
67
GIT_HASH=$1
64
68
shift
@@ -99,7 +103,7 @@ if [ $BUILD -eq 1 ]; then
99
103
100
104
# set the requested commit to build Daphne
101
105
git checkout " $GIT_HASH "
102
- source pack.sh --version " $DAPHNE_VERSION "
106
+ source pack.sh --version " $DAPHNE_VERSION " --feature $FEATURE
103
107
# return to the previous branch
104
108
git checkout -
105
109
You can’t perform that action at this time.
0 commit comments