You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/04/24 18:46:22 UTC

[GitHub] mrutkows closed pull request #48: Add license headers

mrutkows closed pull request #48: Add license headers
URL: https://github.com/apache/incubator-openwhisk-runtime-swift/pull/48
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/swift3.1.1Action/CHANGELOG.md b/core/swift3.1.1Action/CHANGELOG.md
index c523b2e..17279fa 100644
--- a/core/swift3.1.1Action/CHANGELOG.md
+++ b/core/swift3.1.1Action/CHANGELOG.md
@@ -1,3 +1,21 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements.  See the NOTICE file distributed with this work for additional
+# information regarding copyright ownership.  The ASF licenses this file to you
+# under the Apache License, Version 2.0 (the # "License"); you may not use this
+# file except in compliance with the License.  You may obtain a copy of the License
+# at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+#
+-->
+
 # Apache OpenWhisk Swift 3.1 Runtime Container
 
 ## 1.0.0
diff --git a/core/swift3.1.1Action/Dockerfile b/core/swift3.1.1Action/Dockerfile
index d378947..016624a 100755
--- a/core/swift3.1.1Action/Dockerfile
+++ b/core/swift3.1.1Action/Dockerfile
@@ -1,3 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements.  See the NOTICE file distributed with this work for additional
+# information regarding copyright ownership.  The ASF licenses this file to you
+# under the Apache License, Version 2.0 (the # "License"); you may not use this
+# file except in compliance with the License.  You may obtain a copy of the License
+# at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+#
+
 # Dockerfile for swift actions, overrides and extends ActionRunner from actionProxy
 # This Dockerfile is partially based on: https://github.com/IBM-Swift/swift-ubuntu-docker/blob/master/swift-development/Dockerfile
 FROM ibmcom/swift-ubuntu:3.1.1
@@ -26,4 +42,4 @@ RUN python /swift3Action/buildandrecord.py && rm /swift3Action/spm-build/.build/
 #RUN cd /swift3Action/spm-build; swift build -v -c release; rm /swift3Action/spm-build/.build/release/Action
 ENV FLASK_PROXY_PORT 8080
 
-CMD ["/bin/bash", "-c", "cd /swift3Action && PYTHONIOENCODING='utf-8' python -u swift3runner.py"]
\ No newline at end of file
+CMD ["/bin/bash", "-c", "cd /swift3Action && PYTHONIOENCODING='utf-8' python -u swift3runner.py"]
diff --git a/core/swift41Action/CHANGELOG.md b/core/swift41Action/CHANGELOG.md
index 9d82048..8a4d794 100644
--- a/core/swift41Action/CHANGELOG.md
+++ b/core/swift41Action/CHANGELOG.md
@@ -1,3 +1,21 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements.  See the NOTICE file distributed with this work for additional
+# information regarding copyright ownership.  The ASF licenses this file to you
+# under the Apache License, Version 2.0 (the # "License"); you may not use this
+# file except in compliance with the License.  You may obtain a copy of the License
+# at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+#
+-->
+
 # Apache OpenWhisk Swift 4.1 Runtime Container
 
 ## 1.0.4
diff --git a/core/swift41Action/Dockerfile b/core/swift41Action/Dockerfile
index b97f65b..8897ae8 100644
--- a/core/swift41Action/Dockerfile
+++ b/core/swift41Action/Dockerfile
@@ -1,3 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements.  See the NOTICE file distributed with this work for additional
+# information regarding copyright ownership.  The ASF licenses this file to you
+# under the Apache License, Version 2.0 (the # "License"); you may not use this
+# file except in compliance with the License.  You may obtain a copy of the License
+# at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+#
+
 # TODO Replace this dockerfile and extend from official image when 4.1 is released
 FROM ibmcom/ubuntu:14.04
 LABEL Description="Linux Ubuntu 14.04 image with the Swift binaries and tools."
@@ -73,4 +89,4 @@ RUN python /swift4Action/buildandrecord.py && rm /swift4Action/spm-build/.build/
 ENV FLASK_PROXY_PORT 8080
 EXPOSE 8080
 
-CMD ["/bin/bash", "-c", "cd /swift4Action && PYTHONIOENCODING='utf-8' python -u swift4runner.py"]
\ No newline at end of file
+CMD ["/bin/bash", "-c", "cd /swift4Action && PYTHONIOENCODING='utf-8' python -u swift4runner.py"]
diff --git a/tests/dat/actions/HelloSwift3/Sources/main.swift b/tests/dat/actions/HelloSwift3/Sources/main.swift
index 6da92f8..2bd6836 100644
--- a/tests/dat/actions/HelloSwift3/Sources/main.swift
+++ b/tests/dat/actions/HelloSwift3/Sources/main.swift
@@ -1,7 +1,10 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 func main(args: [String:Any]) -> [String:Any] {
     if let name = args["name"] as? String {
         return [ "greeting" : "Hello \(name)!" ]
     } else {
         return [ "greeting" : "Hello stranger!" ]
     }
-}
\ No newline at end of file
+}
diff --git a/tests/dat/actions/HelloSwift4/Sources/main.swift b/tests/dat/actions/HelloSwift4/Sources/main.swift
index 6da92f8..2bd6836 100644
--- a/tests/dat/actions/HelloSwift4/Sources/main.swift
+++ b/tests/dat/actions/HelloSwift4/Sources/main.swift
@@ -1,7 +1,10 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 func main(args: [String:Any]) -> [String:Any] {
     if let name = args["name"] as? String {
         return [ "greeting" : "Hello \(name)!" ]
     } else {
         return [ "greeting" : "Hello stranger!" ]
     }
-}
\ No newline at end of file
+}
diff --git a/tests/dat/actions/HelloSwift4Codable/Sources/main.swift b/tests/dat/actions/HelloSwift4Codable/Sources/main.swift
index 04421af..ffe0549 100644
--- a/tests/dat/actions/HelloSwift4Codable/Sources/main.swift
+++ b/tests/dat/actions/HelloSwift4Codable/Sources/main.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 struct AnInput: Codable {
     let name: String?
 }
@@ -12,4 +15,4 @@ struct AnOutput: Codable {
          let answer = AnOutput(greeting: "Hello stranger!")
          respondWith(answer, nil)
      }
-  }
\ No newline at end of file
+  }
diff --git a/tests/dat/actions/SwiftyRequest/Sources/main.swift b/tests/dat/actions/SwiftyRequest/Sources/main.swift
index 7947eac..3e2399e 100644
--- a/tests/dat/actions/SwiftyRequest/Sources/main.swift
+++ b/tests/dat/actions/SwiftyRequest/Sources/main.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 import SwiftyRequest
 import Dispatch
 import Foundation
@@ -5,7 +8,7 @@ import Foundation
 func main(args: [String:Any]) -> [String:Any] {
     var resp :[String:Any] = ["error":"Action failed"]
     let echoURL = "http://httpbin.org/post"
-    
+
     // setting body data to {"Data":"string"}
     let origJson: [String: Any] = args
     guard let data = try? JSONSerialization.data(withJSONObject: origJson, options: []) else {
@@ -33,4 +36,3 @@ func main(args: [String:Any]) -> [String:Any] {
 }
 //let r = main(args:["message":"serverless"])
 //print(r)
-
diff --git a/tests/dat/actions/SwiftyRequestCodable/Sources/main.swift b/tests/dat/actions/SwiftyRequestCodable/Sources/main.swift
index 599f2f1..43a02d8 100644
--- a/tests/dat/actions/SwiftyRequestCodable/Sources/main.swift
+++ b/tests/dat/actions/SwiftyRequestCodable/Sources/main.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 import SwiftyRequest
 import Dispatch
 import Foundation
@@ -25,4 +28,3 @@ func main(param: AnInput, completion: @escaping (AnOutput?, Error?) -> Void) ->
         }
     }
 }
-
diff --git a/tests/dat/actions/sdk/swift3/createRule.swift b/tests/dat/actions/sdk/swift3/createRule.swift
index 67fa062..5e615e1 100644
--- a/tests/dat/actions/sdk/swift3/createRule.swift
+++ b/tests/dat/actions/sdk/swift3/createRule.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 func main(args: [String:Any]) -> [String:Any] {
   guard let triggerName = args["triggerName"] as? String else {
       return ["error": "You must specify a triggerName parameter!"]
diff --git a/tests/dat/actions/sdk/swift3/createTrigger.swift b/tests/dat/actions/sdk/swift3/createTrigger.swift
index 7039ac4..3a4b7b9 100644
--- a/tests/dat/actions/sdk/swift3/createTrigger.swift
+++ b/tests/dat/actions/sdk/swift3/createTrigger.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 func main(args: [String:Any]) -> [String:Any] {
  guard let triggerName = args["triggerName"] as? String else {
     return ["error": "You must specify a triggerName parameter!"]
diff --git a/tests/dat/actions/sdk/swift3/hello.swift b/tests/dat/actions/sdk/swift3/hello.swift
index 7c903a5..0cc3ca3 100644
--- a/tests/dat/actions/sdk/swift3/hello.swift
+++ b/tests/dat/actions/sdk/swift3/hello.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 /**
  * Hello world as a Swift Whisk action.
  */
diff --git a/tests/dat/actions/sdk/swift3/invoke.swift b/tests/dat/actions/sdk/swift3/invoke.swift
index fd32501..d69e90b 100644
--- a/tests/dat/actions/sdk/swift3/invoke.swift
+++ b/tests/dat/actions/sdk/swift3/invoke.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 import SwiftyJSON
 
 func main(args: [String:Any]) -> [String:Any] {
diff --git a/tests/dat/actions/sdk/swift3/invokeNonBlocking.swift b/tests/dat/actions/sdk/swift3/invokeNonBlocking.swift
index a12c165..813bf8c 100644
--- a/tests/dat/actions/sdk/swift3/invokeNonBlocking.swift
+++ b/tests/dat/actions/sdk/swift3/invokeNonBlocking.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 import SwiftyJSON
 
 func main(args: [String:Any]) -> [String:Any] {
diff --git a/tests/dat/actions/sdk/swift3/trigger.swift b/tests/dat/actions/sdk/swift3/trigger.swift
index 2acf54e..62bf072 100644
--- a/tests/dat/actions/sdk/swift3/trigger.swift
+++ b/tests/dat/actions/sdk/swift3/trigger.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 func main(args: [String:Any]) -> [String:Any] {
   if let triggerName = args["triggerName"] as? String {
     print("Trigger Name: \(triggerName)")
diff --git a/tests/dat/actions/sdk/swift4/createRule.swift b/tests/dat/actions/sdk/swift4/createRule.swift
index 5b9ae8e..b14c53b 100644
--- a/tests/dat/actions/sdk/swift4/createRule.swift
+++ b/tests/dat/actions/sdk/swift4/createRule.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 func main(args: [String:Any]) -> [String:Any] {
   if let baseUrl = args["baseUrl"] as? String {
     //Overriding WHISK API HOST using baseUrl, only applicable in testing with self sign ssl certs"
@@ -14,4 +17,4 @@ func main(args: [String:Any]) -> [String:Any] {
   }
   print("Rule Name: \(ruleName), Trigger Name: \(triggerName), actionName: \(actionName)")
   return Whisk.createRule(ruleNamed: ruleName, withTrigger: triggerName, andAction: actionName)
-}
\ No newline at end of file
+}
diff --git a/tests/dat/actions/sdk/swift4/createTrigger.swift b/tests/dat/actions/sdk/swift4/createTrigger.swift
index 6886abc..7265fe6 100644
--- a/tests/dat/actions/sdk/swift4/createTrigger.swift
+++ b/tests/dat/actions/sdk/swift4/createTrigger.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 func main(args: [String:Any]) -> [String:Any] {
   if let baseUrl = args["baseUrl"] as? String {
     //Overriding WHISK API HOST using baseUrl, only applicable in testing with self sign ssl certs"
@@ -8,4 +11,4 @@ func main(args: [String:Any]) -> [String:Any] {
   }
   print("Trigger Name: \(triggerName)")
   return Whisk.createTrigger(triggerNamed: triggerName, withParameters: [:])
-}
\ No newline at end of file
+}
diff --git a/tests/dat/actions/sdk/swift4/hello.swift b/tests/dat/actions/sdk/swift4/hello.swift
index 6da92f8..2bd6836 100644
--- a/tests/dat/actions/sdk/swift4/hello.swift
+++ b/tests/dat/actions/sdk/swift4/hello.swift
@@ -1,7 +1,10 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 func main(args: [String:Any]) -> [String:Any] {
     if let name = args["name"] as? String {
         return [ "greeting" : "Hello \(name)!" ]
     } else {
         return [ "greeting" : "Hello stranger!" ]
     }
-}
\ No newline at end of file
+}
diff --git a/tests/dat/actions/sdk/swift4/invoke.swift b/tests/dat/actions/sdk/swift4/invoke.swift
index a23dd69..2402441 100644
--- a/tests/dat/actions/sdk/swift4/invoke.swift
+++ b/tests/dat/actions/sdk/swift4/invoke.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 struct Result: Decodable {
   let date: String
 }
@@ -25,4 +28,4 @@ func main(args: [String:Any]) -> [String:Any] {
   }
   // return the entire invokeResult
   return invokeResult
-}
\ No newline at end of file
+}
diff --git a/tests/dat/actions/sdk/swift4/invokeNonBlocking.swift b/tests/dat/actions/sdk/swift4/invokeNonBlocking.swift
index f22c9ff..20a3825 100644
--- a/tests/dat/actions/sdk/swift4/invokeNonBlocking.swift
+++ b/tests/dat/actions/sdk/swift4/invokeNonBlocking.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 struct Activation: Decodable {
   let activationId: String
 }
diff --git a/tests/dat/actions/sdk/swift4/trigger.swift b/tests/dat/actions/sdk/swift4/trigger.swift
index 79b9a76..8cf8bc6 100644
--- a/tests/dat/actions/sdk/swift4/trigger.swift
+++ b/tests/dat/actions/sdk/swift4/trigger.swift
@@ -1,3 +1,6 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
 func main(args: [String:Any]) -> [String:Any] {
   if let baseUrl = args["baseUrl"] as? String {
     //Overriding WHISK API HOST using baseUrl, only applicable in testing with self sign ssl certs"
@@ -9,4 +12,4 @@ func main(args: [String:Any]) -> [String:Any] {
   } else {
     return ["error": "You must specify a triggerName parameter!"]
   }
-}
\ No newline at end of file
+}
diff --git a/tests/dat/build.sh b/tests/dat/build.sh
index 5396324..3df8598 100755
--- a/tests/dat/build.sh
+++ b/tests/dat/build.sh
@@ -1,4 +1,7 @@
 #!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements; and to You under the Apache License, Version 2.0.
+
 set -e
 
 ../../tools/build/compile.sh  HelloSwift3 swift:3.1.1 "-v"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services