Skip to content
Snippets Groups Projects
Commit 307c84f5 authored by squidfunk's avatar squidfunk
Browse files

Fixed Travis build

parent 36e20931
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then ...@@ -49,7 +49,7 @@ if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then
# Set configuration for repository and deploy documentation # Set configuration for repository and deploy documentation
git config --global user.name "${GH_NAME}" git config --global user.name "${GH_NAME}"
git config --global user.email "${GH_EMAIL}" git config --global user.email "${GH_EMAIL}"
git remote set-url origin $REMOTE git remote set-url origin ${REMOTE}
# Install GitHub pages import helper and Material, so we can use it as a # Install GitHub pages import helper and Material, so we can use it as a
# base template and add overrides # base template and add overrides
...@@ -65,7 +65,7 @@ fi ...@@ -65,7 +65,7 @@ fi
rm -rf overrides rm -rf overrides
# Terminate if we're not on a release branch # Terminate if we're not on a release branch
echo "$TRAVIS_BRANCH" | grep -qvE "^[0-9.]+$" && exit 0; :; echo "${TRAVIS_BRANCH}" | grep -qvE "^[0-9.]+$" && exit 0; :;
# Install dependencies for release build # Install dependencies for release build
pip install --user wheel twine pip install --user wheel twine
...@@ -76,23 +76,23 @@ pip install --user urllib3[secure] ...@@ -76,23 +76,23 @@ pip install --user urllib3[secure]
# Build and install theme and Docker image # Build and install theme and Docker image
python setup.py build sdist bdist_wheel --universal python setup.py build sdist bdist_wheel --universal
docker build -t $TRAVIS_REPO_SLUG . docker build -t ${TRAVIS_REPO_SLUG} .
# Prepare build regression test # Prepare build regression test
pushd /tmp pushd /tmp
mkdocs new test && cd test mkdocs new test && cd test
# Test Docker image build # Test Docker image build
docker run --rm -it -v $(pwd):/docs $TRAVIS_REPO_SLUG build --theme material docker run --rm -it -v $(pwd):/docs ${TRAVIS_REPO_SLUG} build --theme material
# Return to original directory # Return to original directory
popd popd
# Push release to PyPI # Push release to PyPI
twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/* twine upload -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
# Push image to Docker Hub # Push image to Docker Hub
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}
docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:$TRAVIS_BRANCH docker tag ${TRAVIS_REPO_SLUG} ${TRAVIS_REPO_SLUG}:${TRAVIS_BRANCH}
docker tag $TRAVIS_REPO_SLUG $TRAVIS_REPO_SLUG:latest docker tag ${TRAVIS_REPO_SLUG} ${TRAVIS_REPO_SLUG}:latest
docker push $TRAVIS_REPO_SLUG docker push ${TRAVIS_REPO_SLUG}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment