Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit 6de20dc

Browse files
authored
Merge pull request #84 from tylerjereddy/timestamp_nightly_wheels
MAINT: timestamp nightlies
2 parents d802630 + 012d2f9 commit 6de20dc

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
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

Lines changed: 14 additions & 0 deletions
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)