mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-12 01:50:52 +01:00
Fixed Travis build
This commit is contained in:
parent
36e2093154
commit
307c84f564
18
.travis.sh
18
.travis.sh
@ -49,7 +49,7 @@ if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||
# Set configuration for repository and deploy documentation
|
||||
git config --global user.name "${GH_NAME}"
|
||||
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
|
||||
# base template and add overrides
|
||||
@ -65,7 +65,7 @@ fi
|
||||
rm -rf overrides
|
||||
|
||||
# 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
|
||||
pip install --user wheel twine
|
||||
@ -76,23 +76,23 @@ pip install --user urllib3[secure]
|
||||
|
||||
# Build and install theme and Docker image
|
||||
python setup.py build sdist bdist_wheel --universal
|
||||
docker build -t $TRAVIS_REPO_SLUG .
|
||||
docker build -t ${TRAVIS_REPO_SLUG} .
|
||||
|
||||
# Prepare build regression test
|
||||
pushd /tmp
|
||||
mkdocs new test && cd test
|
||||
|
||||
# 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
|
||||
popd
|
||||
|
||||
# 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
|
||||
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:latest
|
||||
docker push $TRAVIS_REPO_SLUG
|
||||
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}:latest
|
||||
docker push ${TRAVIS_REPO_SLUG}
|
||||
|
Loading…
Reference in New Issue
Block a user