forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 148
chore: fix prepublish script inconsistencies #2410
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Addressed inconsistencies in the prepublish script by moving the Azure Pipelines checks after the correct tag has been determined.
Saadnajmi
approved these changes
Mar 13, 2025
Saadnajmi
pushed a commit
to Saadnajmi/react-native-macos
that referenced
this pull request
Mar 13, 2025
Addresses inconsistencies in the prepublish script by moving the Azure Pipelines checks after the correct tag has been determined. Ensure tag is correctly set on `main`: ``` ~/S/react-native-macos (main) % node .ado/scripts/prepublish-check.mjs --verbose ❌ .ado/templates/npm-publish-steps.yml: 'publishTag' needs to be set to 'nightly' ``` Ensure tag is correctly set for `0.76-stable` (previous): ``` ~/S/react-native-macos (0.76-stable) % node .ado/scripts/prepublish-check.mjs --verbose ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 76 ℹ️ Expected npm tag: v0.76-stable ❌ 'release.version.generatorOptions.currentVersionResolverMetadata.tag' must be set to 'v0.76-stable' ❌ Nx Release is not correctly configured for the current branch ``` Ensure tag is correctly set for `0.77-stable` (current): ``` ~/S/react-native-macos (0.77-stable) % node .ado/scripts/prepublish-check.mjs --verbose ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 77 ℹ️ Expected npm tag: latest ``` Ensure tag is correctly set for `0.78-stable` (release candidate): ``` ~/S/react-native-macos (0.78-stable) % node .ado/scripts/prepublish-check.mjs --verbose ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 78 ℹ️ Expected npm tag: next ❌ 'defaultBase' must be set to '0.78-stable' ❌ 'release.version.generatorOptions.preid' must be set to 'rc' ❌ 'release.version.generatorOptions.currentVersionResolverMetadata.tag' must be set to 'next' ❌ Nx Release is not correctly configured for the current branch ``` Update config for `0.78-stable` (release candidate): ``` ~/S/react-native-macos (0.78-stable) % node .ado/scripts/prepublish-check.mjs --update ❌ 'defaultBase' must be set to '0.78-stable' ❌ 'release.version.generatorOptions.preid' must be set to 'rc' ❌ 'release.version.generatorOptions.currentVersionResolverMetadata.tag' must be set to 'next' ~/S/react-native-macos (0.78-stable) [1]% node .ado/scripts/prepublish-check.mjs --verbose ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 78 ℹ️ Expected npm tag: next ❌ .ado/templates/npm-publish-steps.yml: 'publishTag' needs to be set to 'next' ``` Mark `0.78-stable` stable: ``` ~/S/react-native-macos (0.78-stable) % node .ado/scripts/prepublish-check.mjs --verbose --tag latest --update ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 78 ℹ️ Expected npm tag: latest ❌ 'defaultBase' must be set to '0.78-stable' ~/S/react-native-macos (0.78-stable) [1]% node .ado/scripts/prepublish-check.mjs --verbose --tag latest ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 78 ℹ️ Expected npm tag: latest ```
Saadnajmi
pushed a commit
to Saadnajmi/react-native-macos
that referenced
this pull request
Mar 13, 2025
Addresses inconsistencies in the prepublish script by moving the Azure Pipelines checks after the correct tag has been determined. Ensure tag is correctly set on `main`: ``` ~/S/react-native-macos (main) % node .ado/scripts/prepublish-check.mjs --verbose ❌ .ado/templates/npm-publish-steps.yml: 'publishTag' needs to be set to 'nightly' ``` Ensure tag is correctly set for `0.76-stable` (previous): ``` ~/S/react-native-macos (0.76-stable) % node .ado/scripts/prepublish-check.mjs --verbose ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 76 ℹ️ Expected npm tag: v0.76-stable ❌ 'release.version.generatorOptions.currentVersionResolverMetadata.tag' must be set to 'v0.76-stable' ❌ Nx Release is not correctly configured for the current branch ``` Ensure tag is correctly set for `0.77-stable` (current): ``` ~/S/react-native-macos (0.77-stable) % node .ado/scripts/prepublish-check.mjs --verbose ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 77 ℹ️ Expected npm tag: latest ``` Ensure tag is correctly set for `0.78-stable` (release candidate): ``` ~/S/react-native-macos (0.78-stable) % node .ado/scripts/prepublish-check.mjs --verbose ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 78 ℹ️ Expected npm tag: next ❌ 'defaultBase' must be set to '0.78-stable' ❌ 'release.version.generatorOptions.preid' must be set to 'rc' ❌ 'release.version.generatorOptions.currentVersionResolverMetadata.tag' must be set to 'next' ❌ Nx Release is not correctly configured for the current branch ``` Update config for `0.78-stable` (release candidate): ``` ~/S/react-native-macos (0.78-stable) % node .ado/scripts/prepublish-check.mjs --update ❌ 'defaultBase' must be set to '0.78-stable' ❌ 'release.version.generatorOptions.preid' must be set to 'rc' ❌ 'release.version.generatorOptions.currentVersionResolverMetadata.tag' must be set to 'next' ~/S/react-native-macos (0.78-stable) [1]% node .ado/scripts/prepublish-check.mjs --verbose ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 78 ℹ️ Expected npm tag: next ❌ .ado/templates/npm-publish-steps.yml: 'publishTag' needs to be set to 'next' ``` Mark `0.78-stable` stable: ``` ~/S/react-native-macos (0.78-stable) % node .ado/scripts/prepublish-check.mjs --verbose --tag latest --update ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 78 ℹ️ Expected npm tag: latest ❌ 'defaultBase' must be set to '0.78-stable' ~/S/react-native-macos (0.78-stable) [1]% node .ado/scripts/prepublish-check.mjs --verbose --tag latest ℹ️ react-native-macos@latest: 77 ℹ️ Current version: 78 ℹ️ Expected npm tag: latest ```
Saadnajmi
added a commit
that referenced
this pull request
Mar 13, 2025
Backport of #2410 to 0.77-stable Co-authored-by: Tommy Nguyen <[email protected]>
Saadnajmi
added a commit
that referenced
this pull request
Mar 13, 2025
Backport of #2410 to 0.76-stable. I'm also updating the nx config tag. --------- Co-authored-by: Tommy Nguyen <[email protected]>
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Addresses inconsistencies in the prepublish script by moving the Azure Pipelines checks after the correct tag has been determined.
Test Plan:
Ensure tag is correctly set on
main
:Ensure tag is correctly set for
0.76-stable
(previous):Ensure tag is correctly set for
0.77-stable
(current):Ensure tag is correctly set for
0.78-stable
(release candidate):Update config for
0.78-stable
(release candidate):Mark
0.78-stable
stable: