Skip to content

Commit b554622

Browse files
committed
Skip upload is token is missing
1 parent 6bb3054 commit b554622

File tree

3 files changed

+27
-15
lines changed

3 files changed

+27
-15
lines changed

.travis.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,4 @@ after_success:
9898
# Note that the anaconda-client package on PyPI is too old. Install from github
9999
# tag instead:
100100
- pip install -q git+https://github.com/Anaconda-Platform/[email protected]
101-
- anaconda -t $OPENBLAS_LIBS_STAGING_UPLOAD_TOKEN upload
102-
--no-progress --force -u multibuild-wheels-staging
103-
-t file -p "openblas-libs"
104-
-v "$(cd OpenBLAS && git describe --tags)"
105-
-d "OpenBLAS for multibuild wheels"
106-
-s "OpenBLAS for multibuild wheels"
107-
libs/openblas*.tar.gz
101+
- upload_to_anaconda

appveyor/upload_to_anaconda_staging.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ pushd OpenBLAS
99
VERSION=$(git describe --tags)
1010
popd
1111

12-
echo "Uploading OpenBLAS $VERSION to anaconda.org staging:"
13-
ls -lh builds/openblas*.zip
12+
if [ "$OPENBLAS_LIBS_STAGING_UPLOAD_TOKEN" == "" ]; then
13+
echo "OPENBLAS_LIBS_STAGING_UPLOAD_TOKEN is not defined: skipping."
14+
else
15+
echo "Uploading OpenBLAS $VERSION to anaconda.org staging:"
16+
ls -lh builds/openblas*.zip
1417

15-
anaconda -t $OPENBLAS_LIBS_STAGING_UPLOAD_TOKEN upload \
16-
--no-progress --force -u multibuild-wheels-staging \
17-
-t file -p "openblas-libs" -v "$VERSION" \
18-
-d "OpenBLAS for multibuild wheels" \
19-
-s "OpenBLAS for multibuild wheels" \
20-
builds/openblas*.zip
18+
anaconda -t $OPENBLAS_LIBS_STAGING_UPLOAD_TOKEN upload \
19+
--no-progress --force -u multibuild-wheels-staging \
20+
-t file -p "openblas-libs" -v "$VERSION" \
21+
-d "OpenBLAS for multibuild wheels" \
22+
-s "OpenBLAS for multibuild wheels" \
23+
builds/openblas*.zip
24+
fi

travis-ci/build_steps.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,17 @@ function do_build_lib {
134134
$BUILD_PREFIX/lib/libopenblas* \
135135
$BUILD_PREFIX/lib/cmake/openblas
136136
}
137+
138+
function upload_to_anaconda {
139+
if [ "$OPENBLAS_LIBS_STAGING_UPLOAD_TOKEN" == "" ]; then
140+
echo "OPENBLAS_LIBS_STAGING_UPLOAD_TOKEN is not defined: skipping."
141+
else
142+
anaconda -t $OPENBLAS_LIBS_STAGING_UPLOAD_TOKEN upload \
143+
--no-progress --force -u multibuild-wheels-staging \
144+
-t file -p "openblas-libs" \
145+
-v "$(cd OpenBLAS && git describe --tags)" \
146+
-d "OpenBLAS for multibuild wheels" \
147+
-s "OpenBLAS for multibuild wheels" \
148+
libs/openblas*.tar.gz
149+
fi
150+
}

0 commit comments

Comments
 (0)