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

feat: add branded_preview to the FOAS release process #136

Merged
merged 6 commits into from
Aug 6, 2024

Conversation

andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Aug 2, 2024

Proposed changes

This PR updates the FOAS release process to generate a branded_preview.html using the foascli versions command similar to what we have in evergreen

File generated by running the script locally using target_env=dev

<!DOCTYPE html>
<html lang="en">
    <body>
        <h2>Preview docs for:</h2>
        <ul>
          <li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2.json' target="_blank">v2.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2.yaml' target="_blank">v2.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2023-01-01.json' target="_blank">openapi-2023-01-01.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2023-01-01.yaml' target="_blank">openapi-2023-01-01.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2023-02-01.json' target="_blank">openapi-2023-02-01.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2023-02-01.yaml' target="_blank">openapi-2023-02-01.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2023-10-01.json' target="_blank">openapi-2023-10-01.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2023-10-01.yaml' target="_blank">openapi-2023-10-01.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2023-11-15.json' target="_blank">openapi-2023-11-15.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2023-11-15.yaml' target="_blank">openapi-2023-11-15.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2024-05-30.json' target="_blank">openapi-2024-05-30.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2024-05-30.yaml' target="_blank">openapi-2024-05-30.yaml</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2025-01-01.json' target="_blank">openapi-2025-01-01.json</a></li><li><a href='https://www.mongodb.com/docs/openapi/preview/?src=https://raw.githubusercontent.com/mongodb/openapi/dev/openapi/v2/openapi-2025-01-01.yaml' target="_blank">openapi-2025-01-01.yaml</a></li>
        </ul>
    </body>
</html>

@andreaangiolillo andreaangiolillo requested a review from a team as a code owner August 2, 2024 17:09
done < <(jq -r '.[]' versions.json)

all_urls=(
"https://raw.githubusercontent.com/mongodb/openapi/${target_env:?}/openapi/v2.json"
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to have a target_branch that is equal to target_env except for prod, where it should be main?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch! yes, indeed. I will update it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@andreaangiolillo andreaangiolillo merged commit c088a5b into main Aug 6, 2024
9 checks passed
@andreaangiolillo andreaangiolillo deleted the add_branded_preview branch August 6, 2024 11:27
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.

3 participants