[swift-build-dev] lifecycle hooks/scripts in swift package manager
VADIME at il.ibm.com
Fri Jun 3 01:41:35 CDT 2016
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-build-dev