Skip to content

added script and doc to automate release in the future#33

Open
aslam9691 wants to merge 10 commits into
firebase:mainfrom
aslam9691:syncup-process
Open

added script and doc to automate release in the future#33
aslam9691 wants to merge 10 commits into
firebase:mainfrom
aslam9691:syncup-process

Conversation

@aslam9691

Copy link
Copy Markdown
Contributor

Script added to sync from the google/boringssl so in future it wont take much time to release new version.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a documentation guide and an automation script (sync-upstream.sh) to streamline syncing the repository with the upstream BoringSSL repository while preserving local SwiftPM configurations. The reviewer provided several constructive suggestions to improve the robustness of the script, including adding missing directories like docs/ and .github/ to the preservation list, fixing a potential nested directory bug during restoration, utilizing a trap for reliable temporary directory cleanup, verifying the existence of the upstream remote, and excluding the .git/ directory from cleanup search paths. Additionally, formatting improvements were suggested for the documentation.

Comment thread scripts/sync-upstream.sh
Comment thread scripts/sync-upstream.sh
Comment thread scripts/sync-upstream.sh
Comment thread scripts/sync-upstream.sh
Comment thread scripts/sync-upstream.sh Outdated
Comment thread scripts/sync-upstream.sh Outdated
Comment thread docs/syncprocess.md Outdated
aslam9691 and others added 6 commits June 19, 2026 13:17
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@aslam9691

Copy link
Copy Markdown
Contributor Author

@cherylEnkidu @ncooke3 Please review.

@ncooke3 ncooke3 self-assigned this Jun 23, 2026

@ncooke3 ncooke3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! LGTM with a couple nits and questions

Comment thread scripts/sync-upstream.sh Outdated
Comment thread docs/syncprocess.md Outdated
Comment thread scripts/sync-upstream.sh Outdated
Comment thread scripts/sync-upstream.sh Outdated

@cherylEnkidu cherylEnkidu 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.

Thank you for writing up this script!

Additionally, we need to ensure that no test code remains in the repository, aligning with the architectural rule we established in our previous review (that test code should not be built or linked into the library at all). To support this, please remove swiftpmtests/ from the PRESERVE list since we have already deleted all local test targets. Furthermore, please update the cleanup find command to delete C test files (*_test.c like ssl_c_test.c) rather than just C++ and Go tests; this will automatically purge upstream C tests during the sync and prevent us from having to manually exclude them in the package manifest in the future.

Comment thread scripts/sync-upstream.sh Outdated
Comment thread scripts/sync-upstream.sh Outdated
Comment thread scripts/sync-upstream.sh Outdated
aslam9691 and others added 3 commits June 25, 2026 11:48
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
@aslam9691

aslam9691 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for writing up this script!

Additionally, we need to ensure that no test code remains in the repository, aligning with the architectural rule we established in our previous review (that test code should not be built or linked into the library at all). To support this, please remove swiftpmtests/ from the PRESERVE list since we have already deleted all local test targets. Furthermore, please update the cleanup find command to delete C test files (*_test.c like ssl_c_test.c) rather than just C++ and Go tests; this will automatically purge upstream C tests during the sync and prevent us from having to manually exclude them in the package manifest in the future.

@cherylEnkidu if we remove swiftpmtest from preserve list, build will be failed.

@aslam9691

Copy link
Copy Markdown
Contributor Author

@ncooke3 @cherylEnkidu suggested changes have been addressed.

Comment thread scripts/sync-upstream.sh
rm -rf .swiftpm/ .bcr/ .build/

# Files and artifacts
find . -type f -not -path "./.git/*" \( -name "*_test.cc" -o -name "*_test.go" -o -name "*_tests.txt" -o -name "*_unittest.cc" \) -delete

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.

find . -type f -not -path "./.git/*" \( -name "*_test.cc" -o -name "*_test.go" -o -name "*_tests.txt" -o -name "*_unittest.cc" -o -name "*_test.c" \) -delete

I think we can include .c test files in the cleanup pattern

Comment thread scripts/sync-upstream.sh
@@ -0,0 +1,79 @@
#!/bin/bash
set -e

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.

We can add a working directory anchor at the top of scripts/sync-upstream.sh (right under set -e) so it runs correctly even if invoked from inside the scripts/ subdirectory:

# Move to repository root
cd "$(dirname "$0")/.."

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants