From b73ef75dcada4c2bb72851743f1ab354ab64cc2a Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Sat, 2 Nov 2019 18:36:20 -0400 Subject: [PATCH] fixup! Fix Travis test for build command. --- .travis.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5e96e4bee..c817b66de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,9 +43,17 @@ script: - tox - | if [[ $TOXENV == "build" ]]; then - # Check that exactly one tarball and one wheel are created - [ $(find . -iwholename 'dist/*.tar.gz' | wc -l) -eq 1 ] - [ $(find . -iwholename 'dist/*.whl' | wc -l) -eq 1 ] + exactly_one() { + value=$(find . -iwholename $1 | wc -l) + if [ $value -neq 1 ]; then + echo "Found $value instances of $1, not 1" + exit 1 + fi + } + + # Check that exactly one tarball and one wheel are created + exactly_one 'dist/*.tar.gz' + exactly_one 'dist/*.whl' fi after_success: