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

Script to update the GitHub preview branches #6758

Conversation

gilles-peskine-arm
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm commented Dec 9, 2022

This pull request is not intended to be merged, I'm just putting it out for visibility and to open comments.

The goal of this pull request is to share the script scripts/update-code-style-preview-branches.sh, which we can use to keep preview branches up to date for the new code style. We'll be doing this on an informal schedule until the switch to the new code style, which we intend to make in the first week of January 2023.

Basic usage:

scripts/update-code-style-preview-branches.sh development mbedtls-2.28

Script quality: it's worked for me once. Caveat utor. I think it should work for others but I suggest first running sh -x scripts/update-code-style-preview-branches.sh which will fetch the resources it needs but not do anything destructive.

The script relies on a commit which is located in a branch on the main repository, with the tag features/new-code-style/switch-to-enforcement. Past versions of that commit are in https://github.com/gilles-peskine-arm/mbedtls/tree/coding-style-switch-to-enforcement-1 etc.

This makes two branches available on the main Mbed TLS repository:

Basic usage:
scripts/update-code-style-preview-branches.sh development mbedtls-2.28

Signed-off-by: Gilles Peskine <[email protected]>
I had forgotten to rename the support function in all.sh. Thanks to David
Horstmann.

Signed-off-by: Gilles Peskine <[email protected]>
This way we can update it globally by force-pushing the tag.

Signed-off-by: Gilles Peskine <[email protected]>
A force push to a remove identified by its URL doesn't actually work: Git
complains about a stale reference. Use a remote name.

Add an option to use different remote names for fetching and pushing,
overriding autodetection. This is needed in nonstandard Git remote setups
such as mine, where I have a separate remote name for pushing only to avoid
accidentally pushing to the "normal" remote name.

Signed-off-by: Gilles Peskine <[email protected]>
@gilles-peskine-arm
Copy link
Contributor Author

The new code style has been merged, so this script is no longer relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant