Command.buildCommand(displayName:executable:arguments:environment:inputFiles:outputFiles:)
Returns a command that runs when any of its output files are needed by the build and are out-of-date.
Declaration
case buildCommand(displayName: String?, executable: URL, arguments: [String], environment: [String : String] = [:], inputFiles: [URL] = [], outputFiles: [URL] = [])Parameters
- displayName:
An optional string to show in build logs and other status areas.
- executable:
The absolute path to the executable to invoke.
- arguments:
The command-line arguments for the executable.
- environment:
Any environment variable assignments visible to the executable.
- inputFiles:
A list of files on which the contents of output files may depend. Any paths passed as
argumentsshould typically be passed here as well. - outputFiles:
A list of files to be generated or updated by the executable. Any files recognizable by their extension as source files (for example,
.swift) are compiled into the target for which this command was generated as if in its source directory; other files are treated as resources as if explicitly listed inPackage.swiftusing.process(...).
Discussion
An output file is out-of-date if it doesn’t exist, or if any input files have changed since the command was last run.