Skip to content

Commit

Permalink
DOC: Set release mode when deploying devdocs only
Browse files Browse the repository at this point in the history
But not for PRs.
  • Loading branch information
QuLogic committed Sep 28, 2021
1 parent f09213d commit 61727eb
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,13 @@ commands:
command: |
# Set epoch to date of latest tag.
export SOURCE_DATE_EPOCH="$(git log -1 --format=%at $(git describe --abbrev=0))"
# Include analytics only when deploying to devdocs.
if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" ] || \
[ "$CIRCLE_BRANCH" != "master" ] || \
[[ "$CIRCLE_PULL_REQUEST" == https://github.com/matplotlib/matplotlib/pull/* ]]; then
export ANALYTICS=False
else
export ANALYTICS=True
# Set release mode only when deploying to devdocs.
if [ "$CIRCLE_PROJECT_USERNAME" = "matplotlib" ] && \
[ "$CIRCLE_BRANCH" = "master" ] && \
[ "$CIRCLE_PR_NUMBER" = "" ]; then
export RELEASE_TAG='-t release'
fi
make html O="-T -Ainclude_analytics=$ANALYTICS"
make html O="-T $RELEASE_TAG"
rm -r build/html/_sources
working_directory: doc
- save_cache:
Expand Down

0 comments on commit 61727eb

Please sign in to comment.