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

Matching release of package to proper page #650

Closed
06chaynes opened this issue Oct 2, 2023 · 3 comments
Closed

Matching release of package to proper page #650

06chaynes opened this issue Oct 2, 2023 · 3 comments
Milestone

Comments

@06chaynes
Copy link
Contributor

I am attempting to setup an integration with both cargo dist and oranda but running into an issue with my generated sites concerning the release that's shown.

Just to give some detail on the setup, I have a repo which contains a workspace (if I understand correctly this is a virtual workspace) that consists of a number of libraries and three packages. The three packages I want to build are tfc-which-workspace, tfc-clean-workspace, and tfc-report-tui. I have the CI workflow generated by cargo dist and when I push the tags (structured as PACKAGE/VERSION, tfc-which-workspace/v0.1.0) I see the three separate releases each with their respective artifacts and installers as expected. I feel I should take a moment here and just thank you for cargo dist, because this much alone feels like magic and I love the results.

My problem occurs after adding the configuration for the oranda site, which I have deployed here. I see the different sites per each member of the workspace I have added to the oranda-workspace json file (looks great btw!) but I noticed that all the install sections are showing only the latest release to have been made. So the page for tfc-clean-workspace shows the install for tfc-which-workspace in this case for example, as it is the latest release. Is it currently possible to match these up so that the release for the package that is generated is shown on the page that was generated for the crate that produced the package (am I butchering the terms here, apologies if so)?

As a side note making this site for my tool might have been a bit frivolous but I was excited to try this integration out, very cool stuff!

@06chaynes
Copy link
Contributor Author

Decided to dig into this to see if I might be able to submit a PR with the changes that I think could address this behavior. If I'm understanding things right I think that something like the following might work:

Modify Context::with_releases with new argument project_config: &ProjectConfig and in the logic while looping through the releases check if the tag contains the name from the project_config, and filtering the result accordingly. At least I think the name from ProjectConfig should work? Then maybe it could be added to the priority list above the normal logic so if there is a match the latest release with a matching name get returned.

Also could maybe modify ArtifactsConfig to include a new boolean field, something like package_specific_releases that defaults to false, then use that later to determine if the release check logic should run like that at all.

Do you think something like this would be worth pursuing or am I approaching this the wrong way? Happy to adjust if so!

@06chaynes
Copy link
Contributor Author

06chaynes commented Oct 3, 2023

Couldn't help myself and have submitted a PR with a potential solution. I was able to test this build of oranda against my site and after enabling the new option in the config the release matches up with the proper project page as I had hoped: #652

EDIT: Adding some screenshots below.

Before:
report-tui-before

After:
report-tui-after

@shadows-withal shadows-withal added this to the oranda-0.5.0 milestone Oct 4, 2023
@06chaynes
Copy link
Contributor Author

Closed by #652

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

No branches or pull requests

2 participants