Skip to content

Commit

Permalink
Merge pull request #38 from mxcl/tweaks
Browse files Browse the repository at this point in the history
Tweaks
  • Loading branch information
repo-ranger[bot] authored Feb 13, 2019
2 parents e74cc63 + d79844c commit a125a87
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
6 changes: 4 additions & 2 deletions .github/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ var defaultSwiftVersion: String {

func podspec(repo: Repo, user: User, pkg: Package) -> (Substring, String) {
let (owner, name) = { ($0[0], $0[1]) }(slug.split(separator: "/"))
let swiftVersion = pkg.swiftLanguageVersions.max() ?? defaultSwiftVersion
let sources = pkg.targets.filter{ $0.type == .regular }.compactMap{ $0.path }.first!
let swiftVersion = pkg.swiftLanguageVersions.min() ?? defaultSwiftVersion
let targets = pkg.targets.filter{ $0.type == .regular }
guard targets.count == 1 else { fatal(message: "Too many targets for this script!") }
guard let sources = targets[0].path else { fatal(message: "Target has no path!") }
return (name, """
Pod::Spec.new do |s|
s.name = '\(name)'
Expand Down
8 changes: 7 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// swift-tools-version:4.2
import PackageDescription

let package = Package(
let pkg = Package(
name: "Path.swift",
products: [
.library(name: "Path", targets: ["Path"]),
Expand All @@ -11,3 +11,9 @@ let package = Package(
.testTarget(name: "PathTests", dependencies: ["Path"]),
]
)

pkg.swiftLanguageVersions = [.v4_2]

#if swift(>=5)
pkg.swiftLanguageVersions.append(.v5)
#endif
17 changes: 0 additions & 17 deletions [email protected]

This file was deleted.

1 change: 1 addition & 0 deletions [email protected]

0 comments on commit a125a87

Please sign in to comment.