-
-
Notifications
You must be signed in to change notification settings - Fork 5
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: Don't attempt publishing non-latest published versions #91
Merged
Conversation
This file contains 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
a7916b5
to
704410b
Compare
When deciding whether to attempt publishing a package, this action would previously compare the latest published version with the current version. If they don't match, it would try to publish the package. However, that version may have been published already, just not as the latest version. This is especially problematic for backports within monorepos. This would result in errors if any package was already published but not at the latest version. The script has been updated to check whether the given package version was published at all. It no longer matters whether it was latest or not. This also fixes the "update-packages-test", which tests with an old version of the snaps monorepo. It was broken because all of the packages being tested have had releases since the last successful run. The test has been updated to add debug logs, and the expected number of packages published has been changed to "2". The test bumps 3 packages and decrements one. One of the bumped packages was the `examples` package, which is private, so that has always been ignored. The expected number of packages has changed from 3 to 2 because the decremented package is now skipped (it was already published).
704410b
to
5d3b52b
Compare
Mrtenz
requested changes
Sep 28, 2023
Gudahtt
commented
Sep 28, 2023
Gudahtt
commented
Sep 28, 2023
Mrtenz
approved these changes
Sep 28, 2023
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.
When deciding whether to attempt publishing a package, this action would previously compare the latest published version with the current version. If they don't match, it would try to publish the package. However, that version may have been published already, just not as the latest version.
This is especially problematic for backports within monorepos. This would result in errors if any package was already published but not at the latest version.
The script has been updated to check whether the given package version was published at all. It no longer matters whether it was latest or not.
This also fixes the "update-packages-test", which tests with an old version of the snaps monorepo. It was broken because all of the packages being tested have had releases since the last successful run. The test has been updated to add debug logs, and the expected number of packages published has been changed to "2".
The test bumps 3 packages and decrements one. One of the bumped packages was the
examples
package, which is private, so that has always been ignored. The expected number of packages has changed from 3 to 2 because the decremented package is now skipped (it was already published).