A question - are there any plans to support lifecycle hooks/scripts in
swift package manager ?
According to the community proposal:
"We are considering supporting hooks for the Swift Package Manager to call
out to other build systems, and/or to invoke shell scripts."
This way, swift package manager will become a build automation tool,
similar to npm and maven. npm seems like the most similar tool to swift
package manager. It has "scripts" property -
"npm supports the "scripts" property of the package.json script, for the
following scripts: pre/post install, pre/post test. etc."
Using lifecycle scripts can facilitate build automation of swift projects,
for example it can enable code generation. LinuxMain.swift and allTests
fields can be generated automatically during the build process.
Before lifecycle scripts are supported, for build automation swift package
manager has to be used with some build automation tool like make, and the
build automation information is spread between Package.swift and Makefile