File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,16 @@ extension AWS.S3.Client
5454 as path: String ) async throws
5555 {
5656 let release : FilePath . Directory = scratch / " release "
57- let executable : FilePath = release / name
58- let compressed : FilePath = release / " \( name) .gz "
57+ let archive : FilePath = release / " \( name) .tar.gz "
5958
6059 print ( " Compressing \( name) ... " )
6160
62- try SystemProcess . init ( command: " gzip " , " -kf " , " \( executable) " ) ( )
63- let file : [ UInt8 ] = try compressed. read ( )
61+ try SystemProcess . init ( command: " tar " ,
62+ " --use-compress-program='gzip -9' " ,
63+ " -C " , " \( release) " ,
64+ " -cf " , " \( archive) " ,
65+ name) ( )
66+ let file : [ UInt8 ] = try archive. read ( )
6467
6568 try await self . connect
6669 {
@@ -72,7 +75,7 @@ extension AWS.S3.Client
7275 // These could be big files, even compressed, so we need to increase the timeout.
7376 try await $0. put ( object: object,
7477 using: . standard,
75- path: " \( path) .gz " ,
78+ path: " \( path) .tar. gz " ,
7679 with: key,
7780 timeout: . seconds( 1200 ) )
7881 }
You can’t perform that action at this time.
0 commit comments