travis: deploy to pypi

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2019-05-20 01:49:00 +03:00
parent aae2c21513
commit b8fd41e923
3 changed files with 63 additions and 53 deletions
+34 -4
View File
@@ -3,8 +3,38 @@
set -x
set -e
if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then
git config --local user.name 'Nightly Travis Builds'
git config --local user.email '<>'
git tag "$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)"
if [[ -z "$TRAVIS_TAG" && "$TRAVIS_EVENT_TYPE" != "cron" ]]; then
echo "Skipping building package."
exit 0
fi
./scripts/build_package.sh
if [[ -n "$TRAVIS_TAG" ]]; then
# Test version
pip uninstall -y dvc
if [ -x "$(command -v dvc)" ]; then
echo "ERROR: dvc command already exists!!!"
exit 1
fi
pip install dist/dvc-*.whl
if [[ "$(dvc --version)" != "$TRAVIS_TAG" ]]; then
echo "ERROR: 'dvc --version'$(dvc -V) doesn't match '$TRAVIS_TAG'"
exit 1
fi
pip uninstall -y dvc
fi
PY_VER=$(python -c 'import sys; print(sys.version_info[0:2])')
if [[ "$PY_VER" != '(2, 7)' ]]; then
echo "Skipping building binary package because of a wrong python version."
exit 0
fi
if [[ "$TRAVIS_OS_NAME" == "osx" && "$TRAVIS_OSX_IMAGE" != "xcode7.3" ]]; then
echo "Skipping building binary package because of a wrong xcode version."
exit 0
fi
./scripts/build_posix.sh
-36
View File
@@ -11,39 +11,3 @@ if [[ "$TRAVIS_PULL_REQUEST" == "false" && \
pip install codecov
codecov
fi
if [[ -z "$TRAVIS_TAG" && "$TRAVIS_EVENT_TYPE" != "cron" ]]; then
echo "Skipping building package."
exit 0
fi
./scripts/build_package.sh
if [[ -n "$TRAVIS_TAG" ]]; then
# Test version
pip uninstall -y dvc
if [ -x "$(command -v dvc)" ]; then
echo "ERROR: dvc command already exists!!!"
exit 1
fi
pip install dist/dvc-*.whl
if [[ "$(dvc --version)" != "$TRAVIS_TAG" ]]; then
echo "ERROR: 'dvc --version'$(dvc -V) doesn't match '$TRAVIS_TAG'"
exit 1
fi
pip uninstall -y dvc
fi
PY_VER=$(python -c 'import sys; print(sys.version_info[0:2])')
if [[ "$PY_VER" != '(2, 7)' ]]; then
echo "Skipping building binary package because of a wrong python version."
exit 0
fi
if [[ "$TRAVIS_OS_NAME" == "osx" && "$TRAVIS_OSX_IMAGE" != "xcode7.3" ]]; then
echo "Skipping building binary package because of a wrong xcode version."
exit 0
fi
./scripts/build_posix.sh