Skip to content

Commit

Permalink
Merge pull request #4 from PromiseKit/swiftpm-package-swift-update
Browse files Browse the repository at this point in the history
Add Package.swift 4.2 format
  • Loading branch information
mxcl authored Dec 7, 2018
2 parents da9e56d + 706ac7f commit 576aaae
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ branches:
stages:
- lint
- carthage
- swiftpm
- test
jobs:
include:
Expand Down Expand Up @@ -33,7 +34,7 @@ jobs:
env: SWIFT=3.3
name: pod lib lint --swift-version=3.3
- <<: *pod
osx_image: xcode10
osx_image: xcode10.1
env: SWIFT=3.4
name: pod lib lint --swift-version=3.4
- <<: *pod
Expand All @@ -45,12 +46,12 @@ jobs:
env: SWIFT=4.1
name: pod lib lint --swift-version=4.1
- <<: *pod
osx_image: xcode10
osx_image: xcode10.1
env: SWIFT=4.2
name: pod lib lint --swift-version=4.2

- stage: carthage
osx_image: xcode10
osx_image: xcode10.1
name: Carthage / watchOS
os: osx
language: objective-c
Expand All @@ -59,10 +60,24 @@ jobs:
cache:
directories:
- Carthage


- &swiftpm
stage: swiftpm
osx_image: xcode10.1
name: swift build (swift-4.2)
os: osx
language: objective-c
script: swift build -Xswiftc -target -Xswiftc x86_64-apple-macosx10.12
- <<: *swiftpm
osx_image: xcode9.4
name: swift build (swift-4.1)
- <<: *swiftpm
osx_image: xcode9.2
name: swift build (swift-4.0)

- &test
stage: test
osx_image: xcode10
osx_image: xcode10.1
name: macOS Tests
env: DST='arch=x86_64' PLAT=macOS
os: osx
Expand Down
26 changes: 26 additions & 0 deletions Package@swift-4.2.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// swift-tools-version:4.2
import PackageDescription

let name = "PMKCloudKit"

let pkg = Package(name: name)
pkg.products = [
.library(name: name, targets: [name]),
]
pkg.swiftLanguageVersions = [.v3, .v4, .v4_2]
pkg.dependencies = [
.package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.0.0")
]

let target: Target = .target(name: name)
target.path = "Sources"
target.exclude = [
"CKContainer+AnyPromise.h",
"CKDatabase+AnyPromise.h",
"\(name).h",
"CKContainer+AnyPromise.m",
"CKDatabase+AnyPromise.m"
]
target.dependencies = ["PromiseKit"]

pkg.targets = [target]

0 comments on commit 576aaae

Please sign in to comment.