Skip to content

Fix error when merging a single archive #1218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ffried
Copy link

@ffried ffried commented May 15, 2025

Bug/issue #, if applicable:

Summary

Currently, when trying to merge a single doccarchive that contains either only references or only tutorials, the command fails because it tries to read from a directory that does not exist (e.g. tutorials in case of a reference-only archive).
While this is a rather special use case, the action basically supports it (except for this error) and we use it to have a unified documentation setup for our packages by generating the doccarchive for each target and then merging them together. For multi-target packages this works fine, but for single-target packages it currently fails.

This fixes the source of this error. Alongside, I've also added a small check to not create directories that are not needed - even when merging multiple archives. With that check, merging two reference-only archives will not create an empty tutorials directory.

Dependencies

None

Testing

Steps:

  1. Create a single doccarchive (with only tutorials or references)
  2. docs merge /path/to/archive.doccarchive --output-path ./combined.doccarchive

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary

ffried added a commit to sersoft-gmbh/oss-common-actions that referenced this pull request May 15, 2025
@heckj
Copy link
Member

heckj commented May 15, 2025

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants