File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,19 @@ function make_path_absolute {
9898 echo " $( cd " $( dirname " $1 " ) " ; pwd) /$( basename " $1 " ) "
9999}
100100
101+ function search_wheel {
102+ # Args: [wheel base name] [index]
103+
104+ BASENAME=" cp$( echo " $1 " | tr -d ' .' ) "
105+ INDEX=" cp$( echo " $2 " | tr -d ' .' ) "
106+
107+ SEARCH_PATTERN=" ${BASENAME} -[^\" ]*${PY_TAG} [^\" ]*${PLATFORM} [^\" ]*\.whl"
108+ echo " Searching for wheel ${SEARCH_PATTERN} "
109+ export WHEEL_FILE=$( curl -sSfL " ${S3_BASE} /index-${INDEX} .html" \
110+ | grep -o " $SEARCH_PATTERN " \
111+ | head -n 1)
112+ }
113+
101114function docker_build_zip {
102115 # Args: [python version] [zip destination]
103116
@@ -122,11 +135,10 @@ function docker_build_zip {
122135 PLATFORM=" manylinux2014_aarch64"
123136 fi
124137 PY_TAG=" cp$( echo " $1 " | tr -d ' .' ) "
125- SEARCH_PATTERN=" ddtrace_serverless-[^\" ]*${PY_TAG} [^\" ]*${PLATFORM} [^\" ]*\.whl"
126- echo " Searching for wheel ${SEARCH_PATTERN} "
127- WHEEL_FILE=$( curl -sSfL " ${S3_BASE} /index-serverless.html" \
128- | grep -o " $SEARCH_PATTERN " \
129- | head -n 1)
138+ search_wheel " ddtrace_serverless" " serverless"
139+ if [ -z " ${WHEEL_FILE} " ]; then
140+ search_wheel " ddtrace" " manylinux2014"
141+ fi
130142 if [ -z " ${WHEEL_FILE} " ]; then
131143 echo " No S3 wheel found for ${PY_TAG} ${PLATFORM} , using default pyproject.toml version"
132144 else
You can’t perform that action at this time.
0 commit comments