Skip to content

Commit

Permalink
Include additional files and paths to include in documentation builds
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepiercy committed Jul 2, 2024
1 parent c521764 commit 9b60182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ build:
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml requirements_docs.txt;
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ src/icalender/*.py CHANGES.rst CONTRIBUTING.rst LICENSE.rst README.rst .readthedocs.yaml requirements_docs.txt;

This comment has been minimized.

Copy link
@niccokunzmann

niccokunzmann Jul 2, 2024

Member

I think, src/icalendar should be enough and would include the subfolders *.rst should also cover all files.

This comment has been minimized.

Copy link
@stevepiercy

stevepiercy Jul 2, 2024

Author Member

Actually it's not correct as is. Try running the git diff locally from the root of the project.

git diff origin/main -- docs/ src/icalender/*.py CHANGES.rst CONTRIBUTING.rst LICENSE.rst README.rst .readthedocs.yaml requirements_docs.txt;

I need to fix the src/ path.

This comment has been minimized.

Copy link
@stevepiercy

stevepiercy Jul 3, 2024

Author Member

Can you replicate what I see? I expect to see diffs for both locations, but only get a diff under docs/.

git diff origin/main -- docs/ src/icalender
  1. Change your working directory to the root of the repository.
  2. Create a new branch from main, git-diff-test.
  3. Edit any files to test diff. No need to save.
  4. When I edit any file in docs/ a diff is shown.
  5. When I edit any file in src/icalendar, no diff is shown.

This comment has been minimized.

Copy link
@stevepiercy

stevepiercy Jul 3, 2024

Author Member

I got it. A . is needed after the --. LOL try DuckDuckGo-ing for that! Now to clean up the rest of the command with exclusions of sub-paths in src/icalendar. We don't want to run docs if there are only changes to files in any of its subdirectories.

This comment has been minimized.

Copy link
@stevepiercy

stevepiercy Jul 3, 2024

Author Member

omg, I can't spell calendar.

then
exit 183;
fi
Expand Down

0 comments on commit 9b60182

Please sign in to comment.