Repository navigation
Prepare manual vcpkg release updates for minimal SQLite and Android curl #1545
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
Merged
bmehta001
merged 7 commits into
microsoft:main
from
bmehta001:fix/vcpkg-release-features
Oct 5, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
340fcbc
Promote release overlays so vcpkg receives SDK features
bmehta001 af64f18
Remove token-backed vcpkg release automation
bmehta001 90d654a
Doc additions
bmehta001 802932f
Clarify maintainer guidance to validate real release packages
bmehta001 ed5bc05
Guard destructive port replacement in Copilot review round 1
bmehta001 c927908
Describe SHA512 input accurately as hexadecimal characters
bmehta001 781d5cb
Merge branch 'main' into fix/vcpkg-release-features
bmehta001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| """Copy the release's complete overlay port into a vcpkg checkout.""" | ||
|
|
||
| import argparse | ||
| import json | ||
| from pathlib import Path | ||
| import re | ||
| import shutil | ||
|
|
||
|
|
||
| def prepare_port(source_port, destination_port, version, sha512): | ||
| if not re.fullmatch(r"\d+\.\d+\.\d+\.\d+", version): | ||
| raise ValueError("Expected a four-component SDK release version") | ||
| if not re.fullmatch(r"[0-9a-fA-F]{128}", sha512): | ||
| raise ValueError("Expected a 128-character hexadecimal SHA512") | ||
| source_port = source_port.resolve() | ||
| destination_port = destination_port.resolve() | ||
| if destination_port.name != "cpp-client-telemetry" or destination_port.parent.name != "ports": | ||
| raise ValueError("Destination must be a ports/cpp-client-telemetry directory") | ||
| if ( | ||
| source_port == destination_port | ||
| or source_port in destination_port.parents | ||
| or destination_port in source_port.parents | ||
| ): | ||
| raise ValueError("Source and destination ports must not overlap") | ||
| vcpkg_root = destination_port.parent.parent | ||
| if ( | ||
| not (vcpkg_root / ".vcpkg-root").is_file() | ||
| or not (vcpkg_root / "scripts" / "buildsystems" / "vcpkg.cmake").is_file() | ||
| ): | ||
| raise ValueError( | ||
| "Destination must belong to a vcpkg checkout containing " | ||
| ".vcpkg-root and scripts/buildsystems/vcpkg.cmake" | ||
| ) | ||
|
|
||
| manifest = json.loads((source_port / "vcpkg.json").read_text(encoding="utf-8")) | ||
| if manifest["name"] != "cpp-client-telemetry": | ||
| raise ValueError("Release overlay is not the cpp-client-telemetry port") | ||
| for feature in ("minimal-sqlite", "android-curl-openssl"): | ||
| if feature not in manifest.get("features", {}): | ||
| raise ValueError(f"Release overlay is missing the {feature} feature") | ||
| manifest["version"] = version | ||
| manifest.pop("port-version", None) | ||
|
|
||
| portfile = (source_port / "portfile.cmake").read_text(encoding="utf-8") | ||
| for field, value in (("REF", f"v{version}"), ("SHA512", sha512)): | ||
| portfile, count = re.subn( | ||
| rf"(?m)^([ \t]*{field}[ \t]+)[^\r\n]+", | ||
| lambda match: match[1] + value, | ||
| portfile, | ||
| ) | ||
| if count != 1: | ||
| raise ValueError(f"Release portfile must contain exactly one {field}") | ||
|
|
||
| # Replace the complete port so obsolete patches cannot survive a release. | ||
| if destination_port.exists(): | ||
| shutil.rmtree(destination_port) | ||
| shutil.copytree(source_port, destination_port) | ||
| (destination_port / "portfile.cmake").write_text(portfile, encoding="utf-8", newline="\n") | ||
| (destination_port / "vcpkg.json").write_text( | ||
| json.dumps(manifest, indent=2) + "\n", encoding="utf-8", newline="\n" | ||
| ) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| parser = argparse.ArgumentParser(description=__doc__) | ||
| parser.add_argument("--source-port", type=Path, required=True) | ||
| parser.add_argument("--destination-port", type=Path, required=True) | ||
| parser.add_argument("--version", required=True) | ||
| parser.add_argument("--sha512", required=True) | ||
| arguments = parser.parse_args() | ||
| prepare_port( | ||
| arguments.source_port, | ||
| arguments.destination_port, | ||
| arguments.version, | ||
| arguments.sha512, | ||
| ) | ||
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.