Skip to content

Commit 012d2f9

Browse files
committed
MAINT: timestamp nightlies
* as outlined in MacPythongh-77, downstream projects will have a hard time automatically downloading our most recently "nightly" (actually weekly) wheel uploads if we don't add a timestamp of sorts * this patch attempts to "borrow" the machinery added by Matti in `https://github.com/MacPython/numpy-wheels/pull/84` for this purpose
1 parent d802630 commit 012d2f9

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ after_success:
120120
# used in Travis CI config, originally
121121
# generated at anaconda.org for scipy-wheels-nightly
122122
- if [ "$TRAVIS_EVENT_TYPE" == "cron" ]; then
123+
source extra_functions.sh;
124+
for f in wheelhouse/*.whl; do rename_wheel $f; done;
123125
ANACONDA_ORG="scipy-wheels-nightly";
124126
pip install git+https://github.com/Anaconda-Server/anaconda-client;
125127
anaconda -t ${SCIPY_WHEELS_NIGHTLY} upload --force -u ${ANACONDA_ORG} ${TRAVIS_BUILD_DIR}/wheelhouse/*.whl;

extra_functions.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
function rename_wheel {
2+
# Call with a name like scipy-1.5.0.dev0+58dbafa-cp37-cp37m-linux_x86_64.whl
3+
4+
# Add a date after the dev0+ and before the hash in yyymmddHHMMSS format
5+
# so pip will pick up the newest build. Try a little to make sure
6+
# - the first part ends with 'dev0+'
7+
# - the second part starts with a lower case alphanumeric then a '-'
8+
# if those conditions are not met, the name will be returned as-is
9+
10+
newname=$(echo "$1" | sed "s/\(.*dev0+\)\([a-z0-9]*-.*\)/\1$(date '+%Y%m%d%H%M%S_')\2/")
11+
if [ "$newname" != "$1" ]; then
12+
mv $1 $newname
13+
fi
14+
}

0 commit comments

Comments
 (0)