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

chore: fail prepare package for release if tag exists #35305

Conversation

cipolleschi
Copy link
Contributor

@cipolleschi cipolleschi commented Nov 10, 2022

Summary

This PR makes sure that the preapre_package_for_release script fail fast if there is already a tag for the desired version
on github.

Changelog

[General] [Added] - Make the prepare_package_for_release fail if there is already a git tag with that version

Test Plan

Tested manually. The script is currently only invoked during the release process.
Screenshot 2022-11-10 at 12 24 03

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Nov 10, 2022
@cipolleschi cipolleschi force-pushed the cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists branch 2 times, most recently from 6c40af0 to cc05168 Compare November 10, 2022 12:31
@analysis-bot
Copy link

analysis-bot commented Nov 10, 2022

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 138af74
Branch: main

@analysis-bot
Copy link

analysis-bot commented Nov 10, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,102,440 +0
android hermes armeabi-v7a 6,470,493 +0
android hermes x86 7,519,895 +0
android hermes x86_64 7,378,573 +0
android jsc arm64-v8a 8,967,309 +0
android jsc armeabi-v7a 7,698,152 +0
android jsc x86 9,029,418 +0
android jsc x86_64 9,507,263 +0

Base commit: 138af74
Branch: main

echo('You may want to rollback the last commit');
echo('git reset --hard HEAD~1');
exit(1);
}
Copy link
Contributor

@kelset kelset Nov 17, 2022

Choose a reason for hiding this comment

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

can you also add this type of logic to bump-oss-script? After L46 would be perfect

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if at line 46 I can access argv. For what I can read, i should manually access yargs... I added it at line 78, right after the extraction of the version.

I also refactored it a little bit to avoid code duplication.

@cipolleschi cipolleschi force-pushed the cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists branch from cc05168 to fcda861 Compare November 18, 2022 16:26
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cipolleschi cipolleschi force-pushed the cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists branch from fcda861 to ee46421 Compare November 18, 2022 16:29
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@kelset kelset left a comment

Choose a reason for hiding this comment

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

:shipit:

@cipolleschi cipolleschi force-pushed the cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists branch from ee46421 to 1f25565 Compare November 21, 2022 11:29
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cipolleschi cipolleschi force-pushed the cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists branch from 1f25565 to 8822d6b Compare November 21, 2022 14:01
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@kelset kelset deleted the cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists branch November 22, 2022 10:23
kelset pushed a commit that referenced this pull request Nov 22, 2022
Summary:
This PR makes sure that the `preapre_package_for_release` script fail fast if there is already a tag for the desired version
on github.

## Changelog

[General] [Added] - Make the `prepare_package_for_release` fail if there is already a git tag with that version

Pull Request resolved: #35305

Test Plan:
Tested manually. The script is currently only invoked during the release process.
<img width="1238" alt="Screenshot 2022-11-10 at 12 24 03" src="https://user-images.githubusercontent.com/11162307/201090947-274c1b1c-0b6a-4619-bc85-fa60e5eaeee1.png">

Reviewed By: cortinico

Differential Revision: D41403159

Pulled By: cipolleschi

fbshipit-source-id: fb87df345b14568c750482e5c68be53551a9acbb

# Conflicts:
#	scripts/release-utils.js
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
This PR makes sure that the `preapre_package_for_release` script fail fast if there is already a tag for the desired version
on github.

## Changelog

[General] [Added] - Make the `prepare_package_for_release` fail if there is already a git tag with that version

Pull Request resolved: facebook#35305

Test Plan:
Tested manually. The script is currently only invoked during the release process.
<img width="1238" alt="Screenshot 2022-11-10 at 12 24 03" src="https://user-images.githubusercontent.com/11162307/201090947-274c1b1c-0b6a-4619-bc85-fa60e5eaeee1.png">

Reviewed By: cortinico

Differential Revision: D41403159

Pulled By: cipolleschi

fbshipit-source-id: fb87df345b14568c750482e5c68be53551a9acbb
@cipolleschi cipolleschi mentioned this pull request Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants