mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-13 18:40:54 +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
|
# 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
|
|||||||
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]
|
|||||||
|
|
||||||
# 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}
|
||||||
|
Loading…
Reference in New Issue
Block a user