Skip to content

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

Closed
cipolleschi wants to merge 1 commit into
mainfrom
cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists
Closed

chore: fail prepare package for release if tag exists#35305
cipolleschi wants to merge 1 commit into
mainfrom
cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists

Conversation

@cipolleschi

@cipolleschicipolleschi commented Nov 10, 2022

Copy link
Copy Markdown
Contributor

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-botfacebook-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
cipolleschiforce-pushed the cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists branch 2 times, most recently from 6c40af0 to cc05168CompareNovember 10, 2022 12:31
@analysis-bot

analysis-bot commented Nov 10, 2022

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
ios-universaln/a--

Base commit: 138af74
Branch: main

@analysis-bot

analysis-bot commented Nov 10, 2022

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a7,102,440+0
androidhermesarmeabi-v7a6,470,493+0
androidhermesx867,519,895+0
androidhermesx86_647,378,573+0
androidjscarm64-v8a8,967,309+0
androidjscarmeabi-v7a7,698,152+0
androidjscx869,029,418+0
androidjscx86_649,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);
}

@kelsetkelsetNov 17, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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
cipolleschiforce-pushed the cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists branch from cc05168 to fcda861CompareNovember 18, 2022 16:26
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@cipolleschi
cipolleschiforce-pushed the cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists branch from fcda861 to ee46421CompareNovember 18, 2022 16:29
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@kelsetkelset left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:shipit:

@cipolleschi
cipolleschiforce-pushed the cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists branch from ee46421 to 1f25565CompareNovember 21, 2022 11:29
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@cipolleschi
cipolleschiforce-pushed the cipolleschi/make_prepare_pkg_for_release_fail_if_tag_exists branch from 1f25565 to 8822d6bCompareNovember 21, 2022 14:01
@facebook-github-bot

Copy link
Copy Markdown
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
@cipolleschicipolleschi mentioned this pull request Oct 11, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.p: FacebookPartner: FacebookPartner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@cipolleschi@analysis-bot@facebook-github-bot@kelset