@@ -130,7 +130,7 @@ extension ShellOutCommand: CustomStringConvertible {
130130public extension ShellOutCommand {
131131 static func bash( arguments: [ Argument ] ) -> Self {
132132 let arguments = arguments. first == " -c " ? Array ( arguments. dropFirst ( ) ) : arguments
133- return . init( command: " bash " , arguments: [ " -c " , arguments. map ( \. string ) . joined ( separator: " " ) ] )
133+ return . init( command: " bash " , arguments: [ " -c " , arguments. map ( \. description ) . joined ( separator: " " ) ] )
134134 }
135135}
136136
@@ -158,7 +158,7 @@ public extension ShellOutCommand {
158158 /// Create a git commit with a given message (also adds all untracked file to the index)
159159 static func gitCommit( message: String , allowingPrompt: Bool = true , quiet: Bool = true ) -> ShellOutCommand {
160160 var command = git ( allowingPrompt: allowingPrompt)
161- . appending ( arguments: [ " commit " , " -a " , " -m " , message. quoted. string ] )
161+ . appending ( arguments: [ " commit " , " -a " , " -m " , " \( message. quoted) " ] )
162162
163163 if quiet {
164164 command. append ( argument: " --quiet " )
@@ -245,7 +245,7 @@ public extension ShellOutCommand {
245245
246246 /// Create a file with a given name and contents (will overwrite any existing file with the same name)
247247 static func createFile( named name: String , contents: String ) -> ShellOutCommand {
248- . init ( command : " bash " , arguments: [ " -c " , #"echo \#( contents. quoted) > \#( name. quoted) "# ] )
248+ . bash( arguments: [ " -c " , #"echo \#( contents. quoted) > \#( name. quoted) "# . verbatim ] )
249249 }
250250
251251 /// Move a file from one path to another
@@ -284,21 +284,6 @@ public extension ShellOutCommand {
284284 }
285285}
286286
287- /// Marathon commands
288- public extension ShellOutCommand {
289- /// Run a Marathon Swift script
290- static func runMarathonScript( at path: String , arguments: [ String ] = [ ] ) -> ShellOutCommand {
291- . init( command: " marathon " ,
292- arguments: [ " run " , path] + arguments)
293- }
294-
295- /// Update all Swift packages managed by Marathon
296- static func updateMarathonPackages( ) -> ShellOutCommand {
297- . init( command: " marathon " ,
298- arguments: [ " update " ] )
299- }
300- }
301-
302287/// Swift Package Manager commands
303288public extension ShellOutCommand {
304289 /// Enum defining available package types when using the Swift Package Manager
@@ -316,7 +301,7 @@ public extension ShellOutCommand {
316301 /// Create a Swift package with a given type (see SwiftPackageType for options)
317302 static func createSwiftPackage( withType type: SwiftPackageType = . library) -> ShellOutCommand {
318303 . init( command: " swift " ,
319- arguments: [ " package init --type \( type) " ] )
304+ arguments: [ " package " , " init " , " --type " , " \( type) " ] )
320305 }
321306
322307 /// Update all Swift package dependencies
@@ -333,28 +318,7 @@ public extension ShellOutCommand {
333318 /// Test a Swift package using a given configuration (see SwiftBuildConfiguration for options)
334319 static func testSwiftPackage( withConfiguration configuration: SwiftBuildConfiguration = . debug) -> ShellOutCommand {
335320 . init( command: " swift " ,
336- arguments: [ " test -c \( configuration) " ] )
337- }
338- }
339-
340- /// Fastlane commands
341- public extension ShellOutCommand {
342- /// Run Fastlane using a given lane
343- static func runFastlane( usingLane lane: String ) -> ShellOutCommand {
344- . init( command: " fastlane " , arguments: [ lane] )
345- }
346- }
347-
348- /// CocoaPods commands
349- public extension ShellOutCommand {
350- /// Update all CocoaPods dependencies
351- static func updateCocoaPods( ) -> ShellOutCommand {
352- . init( command: " pod " , arguments: [ " update " ] )
353- }
354-
355- /// Install all CocoaPods dependencies
356- static func installCocoaPods( ) -> ShellOutCommand {
357- . init( command: " pod " , arguments: [ " install " ] )
321+ arguments: [ " test " , " -c " , " \( configuration) " ] )
358322 }
359323}
360324
0 commit comments