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

fix(build): sort meta files #9899

Merged
merged 5 commits into from
Nov 6, 2023
Merged

fix(build): sort meta files #9899

merged 5 commits into from
Nov 6, 2023

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Oct 30, 2023

Summary

Problem

The content of allBrowserCompat.txt, metadata.json and sitemaps/*/sitemap.xml.gz differs from build to build, because the order of its values is not deterministic.

Solution

Sort the values before writing them to the files.


How did you test this change?

  1. Ran yarn build --locale en-us -n and looked at allBrowserCompat.txt and metadata.json.
  2. Then ran yarn build --locale en-us --sitemap-index and looked at sitemaps/en-us/sitemap.xml.gz (with zless).

Avoids this file from showing up when comparing two builds.
@caugner caugner requested a review from a team as a code owner October 30, 2023 10:19
Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

looks good: a couple of nits, but feel free to merge without addressing them

Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

looks good!

@caugner caugner merged commit 37bf90c into main Nov 6, 2023
@caugner caugner deleted the sort-metadata-files branch November 6, 2023 15:47
@caugner caugner changed the title fix(build): sort metadata files fix(build): sort meta files Nov 6, 2023
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