@@ -6,7 +6,6 @@ import argparse
66import datetime
77import re
88from build_support .actions import Action , ActionRunner , DownloadBaseSnapshotAction , derive_options_from_args
9- from build_support .platform import PlatformInfo
109
1110
1211SDK_GENERATOR_PKG_PATH = os .path .join (
@@ -22,18 +21,6 @@ class SnapshotInfo:
2221 self .artifact_name = artifact_name
2322 self .daily_snapshot = daily_snapshot
2423
25- @property
26- def toolchain_name (self ):
27- return f"swift-wasm-{ self .swift_version } "
28-
29- @property
30- def swift_sdk_name (self ):
31- return f"{ self .swift_version } -wasm"
32-
33- @property
34- def tarball_name (self ):
35- return f"{ self .artifact_name } .tar.gz"
36-
3724 @property
3825 def artifactbundle_zip_name (self ):
3926 return f"{ self .artifact_name } .artifactbundle.zip"
@@ -165,21 +152,6 @@ class PackageSwiftSDKAction(Action):
165152 os .chdir (old_cwd )
166153
167154
168- class CleanBuildArtifactAction (Action ):
169- def run (self ):
170- import shutil
171- print ("=====> Cleaning build artifacts" )
172- build_paths = [
173- os .path .join (".." , "build" , "WebAssemblyCompiler" ),
174- ]
175- for path in build_paths :
176- if not os .path .exists (path ):
177- continue
178- print (f"=====> Removing { path } " )
179- if not self .options .dry_run :
180- shutil .rmtree (path , ignore_errors = True )
181-
182-
183155def derive_toolchain_channel (scheme : str ) -> str :
184156 release_scheme_prefix = "release-"
185157 if scheme == "main" :
@@ -197,15 +169,6 @@ def derive_swift_version(daily_snapshot: bool, toolchain_channel: str, now: date
197169 return f"{ toolchain_channel } -SNAPSHOT"
198170
199171
200- def derive_snapshot_info (daily_snapshot : bool , scheme : str , now : datetime .datetime ) -> SnapshotInfo :
201- toolchain_channel = derive_toolchain_channel (scheme )
202- swift_version = derive_swift_version (daily_snapshot , toolchain_channel , now )
203- platform_info = PlatformInfo .derive ()
204- os_suffix = "macos" if platform_info .full_name == "osx" else platform_info .full_name
205- artifact_name = f"swift-wasm-{ toolchain_channel } -SNAPSHOT-{ os_suffix } _{ platform_info .arch } "
206- return SnapshotInfo (now .year , now .month , now .day , swift_version , artifact_name , daily_snapshot )
207-
208-
209172def derive_date_suffix_from_base_tag (tag : str ) -> datetime .datetime :
210173 # e.g.
211174 # swift-6.1-DEVELOPMENT-SNAPSHOT-2025-02-07-a -> 2025-02-07-a
@@ -237,11 +200,7 @@ def main():
237200 parser .add_argument ("--daily-snapshot" , action = "store_true" , help = "Create a daily snapshot" )
238201 options = derive_options_from_args (sys .argv [1 :], parser )
239202 now = derive_date_suffix_from_base_tag (options .tag )
240- actions = []
241- if options .optimize_disk_footprint :
242- actions .append (CleanBuildArtifactAction (options ))
243-
244- actions .append (DownloadBaseSnapshotAction (options ))
203+ actions = [DownloadBaseSnapshotAction (options )]
245204
246205 packaging_dir = os .path .join (
247206 os .path .dirname (__file__ ), '..' , '..' , '..' , 'build' , 'Packaging' )
0 commit comments