Skip to content
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

Support custom tag prefix for release docs #1993

Merged
merged 22 commits into from
Jan 5, 2023
Merged

Support custom tag prefix for release docs #1993

merged 22 commits into from
Jan 5, 2023

Conversation

hannahilea
Copy link
Contributor

@hannahilea hannahilea commented Dec 13, 2022

Implement #1792. Is non-breaking.

  • support tag_prefix:
    • in version_tag_strip_build
      • tests
    • thread through deploy_folder
      • tests
    • thread through deploydocs
      • tests
  • docstrings updated
  • docs (examples) updated
    • add test for monorepo behavior as described in docs
  • do lint pass
  • update changelog

Edit by @mortenpi: close #1792, close #1291

@hannahilea
Copy link
Contributor Author

wip - next step: update/redo current pr's approach to deploydocs to save in subdir and not prefix links

@mortenpi mortenpi added this to the 0.28.0 milestone Dec 13, 2022
@hannahilea
Copy link
Contributor Author

This is my first PR for this repo, so let me know if there are additional tests/docs/etc that I should include here!

This implementation is non-breaking, so could potentially be included in (or back-ported to) a v0.27 patch. Since the changelog shows the next unreleased version as 0.28.0 (and I see that this issue has been added to the 0.28.0 milestone) I've only added it to the changelog's 0.28.0 section.

Also, from #1792 I considered

Another possibility would be to allow the user to pass a full regex, requiring it to have one capture group which would have to capture the pure version number (i.e. something like tag_regex = r"^MyPackage-([0-9-+.]+)$"; optionally with a named capture group). More general, but at the same time more complicated for the user.

I started with the basic prefix option, with the idea that once I got a hang for the structure of the codebase I'd know how complicated the regex option would be to plumb through. After adding the basic prefix option, though, I think that it is sufficient for the original motivating feature request that @ericphanson described (in regards to our particular monorepo). I also think the regex option could introduce complicated implementation around versioned tags that maybe isn't worth taking on until there's a motivating use case without a simpler solution. (I suspect that it would likely be relevant for a non-versioned tag workflow.)

@hannahilea hannahilea marked this pull request as ready for review December 20, 2022 12:23
@fredrikekre
Copy link
Member

Closes #1291.

@hannahilea
Copy link
Contributor Author

hannahilea commented Dec 21, 2022

I'm not sure why the changelog CI is failing---when I ran it locally yesterday it passed. Any hints on what might be failing there would be welcome!

@mortenpi
Copy link
Member

I'm not sure why the changelog CI is failing

You just need to add the Markdown link definition to the PR at the bottom of the file.

@hannahilea
Copy link
Contributor Author

thanks! added.

Copy link
Member

@mortenpi mortenpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks excellent! I presume it's good to go?

Do you happen to have an example run somewhere with the branch?

@hannahilea
Copy link
Contributor Author

Do you happen to have an example run somewhere with the branch?

Nothing public facing, so I started an example public monorepo (https://github.com/hannahilea/ExampleMonorepo.jl); I ran out of time to try it on this branch but should have the example running tomorrow. Will update when that's up!

@hannahilea
Copy link
Contributor Author

hannahilea commented Jan 4, 2023

Do you happen to have an example run somewhere with the branch?

Here's an example monorepo that uses this Documenter.jl branch---note that each package (ExampleMonorepo.jl, SubpackageA.jl, and SubpackageB.jl) was each tagged with a separate version so that it's clear that each docs version is correct:

@mortenpi mortenpi merged commit 1eef001 into JuliaDocs:master Jan 5, 2023
@mortenpi
Copy link
Member

mortenpi commented Jan 5, 2023

That looks awesome. Thanks a lot!

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

Successfully merging this pull request may close these issues.

Support custom tags for release docs Release builds for packages in subdirectories
5 participants