This repository was archived by the owner on Aug 30, 2024. It is now read-only.
File tree 3 files changed +29
-9
lines changed
3 files changed +29
-9
lines changed Original file line number Diff line number Diff line change 90
90
91
91
- bash : |
92
92
set -e
93
- if [ "$BUILD_REASON " == "Schedule " ]; then
93
+ if [ "$BUILD_COMMIT " == "master " ]; then
94
94
ANACONDA_ORG="scipy-wheels-nightly"
95
95
TOKEN="$MAPPED_NUMPY_NIGHTLY_UPLOAD_TOKEN"
96
96
else
@@ -111,10 +111,12 @@ jobs:
111
111
112
112
- bash : |
113
113
set -e
114
- # The --force option forces a replacement if the remote file already
115
- # exists.
114
+ source extra_functions.sh
115
+ for f in wheelhouse/*.whl; do rename_wheel $f; done
116
+
116
117
echo uploading wheelhouse/*.whl
117
- anaconda -t $TOKEN upload --force -u $ANACONDA_ORG wheelhouse/*.whl
118
+
119
+ anaconda -t $TOKEN upload -u $ANACONDA_ORG wheelhouse/*.whl
118
120
echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple"
119
121
displayName: Upload to anaconda.org (only if secret token is retrieved)
120
122
condition: ne(variables['TOKEN'], '')
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ jobs:
118
118
119
119
- bash : |
120
120
set -e
121
- if [ "$BUILD_REASON " == "Schedule " ]; then
121
+ if [ "$BUILD_COMMIT " == "master " ]; then
122
122
ANACONDA_ORG="scipy-wheels-nightly"
123
123
TOKEN="$MAPPED_NUMPY_NIGHTLY_UPLOAD_TOKEN"
124
124
else
@@ -139,10 +139,12 @@ jobs:
139
139
140
140
- bash : |
141
141
set -e
142
- # The --force option forces a replacement if the remote file already
143
- # exists.
142
+ source extra_functions.sh
143
+ for f in numpy/dist/numpy-*.whl; do rename_wheel $f; done
144
+
144
145
echo uploading numpy/dist/numpy-*.whl
145
- anaconda -t $TOKEN upload --force -u $ANACONDA_ORG numpy/dist/numpy-*.whl
146
+
147
+ anaconda -t $TOKEN upload -u $ANACONDA_ORG numpy/dist/numpy-*.whl
146
148
echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple"
147
149
displayName: Upload to anaconda.org (only if secret token is retrieved)
148
150
condition: ne(variables['TOKEN'], '')
Original file line number Diff line number Diff line change @@ -29,6 +29,22 @@ function teardown_test_venv {
29
29
source venv/bin/activate
30
30
fi
31
31
fi
32
- }
32
+ }
33
+
34
+ function rename_wheel {
35
+ # Call with a name like numpy-1.19.0.dev0+58dbafa-cp37-cp37m-linux_x86_64.whl
36
+
37
+ # Add a date after the dev0+ and before the hash in yyymmddHHMMSS format
38
+ # so pip will pick up the newest build. Try a little to make sure
39
+ # - the first part ends with 'dev0+'
40
+ # - the second part starts with a lower case alphanumeric then a '-'
41
+ # if those conditions are not met, the name will be returned as-is
42
+
43
+ newname=$( echo " $1 " | sed " s/\(.*dev0+\)\([a-z0-9]*-.*\)/\1$( date ' +%Y%m%d%H%M%S_' ) \2/" )
44
+ if [ " $newname " != " $1 " ]; then
45
+ mv $1 $newname
46
+ fi
47
+ }
48
+
33
49
# Work around bug in multibuild
34
50
if [ ! -o PIP_CMD ]; then PIP_CMD=" $PYTHON_EXE -m pip" ; fi
You can’t perform that action at this time.
0 commit comments