@@ -6,7 +6,6 @@ import argparse
6
6
import datetime
7
7
import re
8
8
from build_support .actions import Action , ActionRunner , DownloadBaseSnapshotAction , derive_options_from_args
9
- from build_support .platform import PlatformInfo
10
9
11
10
12
11
SDK_GENERATOR_PKG_PATH = os .path .join (
@@ -22,18 +21,6 @@ class SnapshotInfo:
22
21
self .artifact_name = artifact_name
23
22
self .daily_snapshot = daily_snapshot
24
23
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
-
37
24
@property
38
25
def artifactbundle_zip_name (self ):
39
26
return f"{ self .artifact_name } .artifactbundle.zip"
@@ -165,21 +152,6 @@ class PackageSwiftSDKAction(Action):
165
152
os .chdir (old_cwd )
166
153
167
154
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
-
183
155
def derive_toolchain_channel (scheme : str ) -> str :
184
156
release_scheme_prefix = "release-"
185
157
if scheme == "main" :
@@ -197,15 +169,6 @@ def derive_swift_version(daily_snapshot: bool, toolchain_channel: str, now: date
197
169
return f"{ toolchain_channel } -SNAPSHOT"
198
170
199
171
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
-
209
172
def derive_date_suffix_from_base_tag (tag : str ) -> datetime .datetime :
210
173
# e.g.
211
174
# swift-6.1-DEVELOPMENT-SNAPSHOT-2025-02-07-a -> 2025-02-07-a
@@ -237,11 +200,7 @@ def main():
237
200
parser .add_argument ("--daily-snapshot" , action = "store_true" , help = "Create a daily snapshot" )
238
201
options = derive_options_from_args (sys .argv [1 :], parser )
239
202
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 )]
245
204
246
205
packaging_dir = os .path .join (
247
206
os .path .dirname (__file__ ), '..' , '..' , '..' , 'build' , 'Packaging' )
0 commit comments