I want to replace my CI bash scripts with swift. I can't figure out how to invoke normal terminal command such as ls
or xcodebuild
#!/usr/bin/env xcrun swift
import Foundation // Works
println("Test") // Works
ls // Fails
xcodebuild -workspace myApp.xcworkspace // Fails
$ ./script.swift
./script.swift:5:1: error: use of unresolved identifier 'ls'
ls // Fails
^
... etc ....
If you don't use command outputs in Swift code, following would be sufficient:
Updated: for Swift3/Xcode8