|tagger||Paul Castro <email@example.com>||Wed Jul 27 14:23:03 2016 -0400|
Update usage comments, support Xcode project as root directory
|author||Paul Castro <firstname.lastname@example.org>||Wed Jul 27 14:22:42 2016 -0400|
|committer||Paul Castro <email@example.com>||Wed Jul 27 14:22:42 2016 -0400|
Merge branch 'master' of github.com:openwhisk/WhiskSwiftTools
A collection of tools to help developers use OpenWhisk on OS X. Implemented in Swift 3 because Swift 3.
More documentation coming soon!
A CLI tool that allows developers to install OpenWhisk “projects” into the OpenWhisk backend. A project contains sets of actions (JS and Swift), triggers, and rules which can be installed with a single command
wsktool install. You can do the opposite with
wsktool uninstall. You can see an example of an OpenWhisk project here.
wsktool looks installs code based on the following project structure.
_ Ignored files - src |_ root-manifest.json |_ source_code.js // JS action in default package and namespace |_ action_source_code.swift // Swift action in default package and namespace |_ mypackage1 // package |_mypackage1-manifest.json // Package specific settings |_source_code.js |_ mypackage2 |_source_code.swift
wsktool looks for a
src directory in the project home. It will walk this directory and install/delete OpenWhisk actions, triggers, and rules using the following conventions:
root-manifest.jsoncontains definitions for triggers, rules, sequences, action parameters, and special runtime settings, e.g. Swift3 instead of Swift 2.
wsktoolwill automatically download, bind, and install these with the main project.
<package-name>-manifest.jsoncontains package specific settings for actions. Settings here will override settings in
A Swift 3 set of protocols and classes that lets you implement actions in Xcode. WhiskKit provides an Xcode to OpenWhisk bridge via
wsktool that allows you to directly install WhiskKit actions into OpenWhisk. To access the bridge, add dependency to the
root-manifest.json where the
src directory contains an Xcode project.
wsktool will search the project for Swift 3 actions.
This code is build using Xcode 8 Beta 3.
There is a dependency on an ObjC project ZipArchive. OS X CLI targets and frameworks don't play together very well. The “easiest” way to reference it is to add the code manually to WhiskSwiftTools. Clone ZipArchive and install per the documentations on the ZipArchive readme. Copy the SSZipArchive folder into the project folder and link to the
libz library. WhiskSwiftTools includes bridging header file you can reference.
wsktool looks for a property file ~/.wskprops to get your OpenWhisk credentials and namespace. You get this when you install the OpenWhisk CLI, or you can create it yourself. It looks like this:
APIHOST=openwhisk.ng.bluemix.net NAMESPACE=<whatever namespace you are using> AUTH=<auth token from openwhisk>
Copyright 2015-2016 IBM Corporation
Licensed under the Apache License, Version 2.0 (the “License”).
Unless required by applicable law or agreed to in writing, software distributed under the license is distributed on an “as is” basis, without warranties or conditions of any kind, either express or implied. See the license for the specific language governing permissions and limitations under the license.