fonttools/.travis/before_deploy.sh
Cosimo Lupo 61ab1e7f6d
build sdist/wheel only once for both Github and PyPI
This makes sure we upload the same files to Github Releases and PyPI.

Currently we were building them twice, with the risk of different files
being uploaded to the two repositories.
2016-12-26 19:36:08 +00:00

16 lines
438 B
Bash
Executable File

#!/bin/bash
set -e
set -x
# build sdist and wheel distribution packages in ./dist folder.
# Travis runs the `before_deploy` stage before each deployment, but
# we only want to build them once, as we want to use the same
# files for both Github and PyPI
if $(ls ./dist/fonttools*.zip > /dev/null 2>&1) && \
$(ls ./dist/fonttools*.whl > /dev/null 2>&1); then
echo "Distribution packages already exists; skipping"
else
tox -e bdist
fi