[swift-build-dev] lifecycle hooks/scripts in swift package manager
Vadim Eisenberg
VADIME at il.ibm.com
Fri Jun 3 01:41:35 CDT 2016
Hello,
A question - are there any plans to support lifecycle hooks/scripts in
swift package manager ?
According to the community proposal:
https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageManagerCommunityProposal.md#support-for-other-build-systems
"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 -
https://docs.npmjs.com/misc/scripts:
"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
files.
Best Regards,
Vadim Eisenberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20160603/05f4c7c8/attachment.html>
More information about the swift-build-dev
mailing list