forked from EMS-TU-Ilmenau/fastmat
/
.travis.yml.after_success
executable file
·41 lines (32 loc) · 1.29 KB
/
.travis.yml.after_success
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
echo "Finished job for $TRAVIS_BRANCH:py$TRAVIS_PYTHON_VERSION successfully. Post processing ..."
if [[ "$TRAVIS_BRANCH" == "stable" ]]; then
echo "Uploading generated wheels..."
ls -l wheelhouse/*
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install twine
twine upload wheelhouse/*.whl --skip-existing || true
if [[ ""$TRAVIS_PYTHON_VERSION == "3.9" ]] ; then
python setup.py sdist
twine upload dist/* --skip-existing || true
fi
elif [[ "$TRAVIS_BRANCH" == "master" ]] ; then
if [[ "$TRAVIS_PYTHON_VERSION" == "3.9" ]] ; then
echo "Submitting coverage analysis results..."
coveralls
echo "Merging master into stable..."
GH_REPO=github.com/EMS-TU-Ilmenau/fastmat.git
REPO_DIR=./repo
git clone --branch master https://www.${GH_REPO} ${REPO_DIR}
pushd ${REPO_DIR}
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis CI deployment bot"
git remote add origin-stable https://${GH_TOKEN}@${GH_REPO} > /dev/null 2>&1
git checkout stable
git merge master -X theirs
git push --set-upstream origin-stable stable
popd
rm -rf ${REPO_DIR}
fi
fi