Skip to content

Commit 5e0aae5

Browse files
Add --swift-version option to package-toolchain
1 parent 6443644 commit 5e0aae5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/build/package-toolchain

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ def derive_date_suffix_from_base_tag(tag: str) -> datetime.datetime:
201201
def main():
202202
parser = argparse.ArgumentParser(description='A script to create a workspace for a Swift project applying patches')
203203
parser.add_argument("--daily-snapshot", action="store_true", help="Create a daily snapshot")
204+
parser.add_argument("--swift-version", type=str,
205+
help="The custom Swift version string to use in the SDK (e.g. DEVELOPMENT-SNAPSHOT+PATCH)")
204206
options = derive_options_from_args(sys.argv[1:], parser)
205207
now = derive_date_suffix_from_base_tag(options.tag)
206208
actions = []
@@ -231,7 +233,7 @@ def main():
231233
for target_triple, short_triple in triples:
232234
snapshot_info = SnapshotInfo(
233235
now.year, now.month, now.day,
234-
swift_version=derive_swift_version(
236+
swift_version=options.swift_version or derive_swift_version(
235237
options.daily_snapshot, toolchain_channel, now),
236238
artifact_name=f"swift-wasm-{toolchain_channel}-SNAPSHOT-{target_triple}",
237239
daily_snapshot=options.daily_snapshot

0 commit comments

Comments
 (0)