Compare commits

...

7 Commits

Author SHA1 Message Date
repo-ranger[bot]
24a54c2ee0 Merge pull request #39 from mxcl/less-manifests-test
You can specify future Swifts in a 4.2 manifest!
2019-02-14 01:00:02 +00:00
Max Howell
3735ed4476 You can specify future Swifts in a 4.2 manifest! 2019-02-13 19:40:07 -05:00
Max Howell
2880aa556b This hack did not work in fact 2019-02-13 16:28:16 -05:00
repo-ranger[bot]
a125a871f5 Merge pull request #38 from mxcl/tweaks
Tweaks
2019-02-13 21:13:29 +00:00
Max Howell
d79844cf2b Use a symlink to prevent Package.swift divergence 2019-02-13 15:53:41 -05:00
Max Howell
d0648411ea Get minimum supported Swift version for CocoaPods 2019-02-13 15:47:40 -05:00
Max Howell
e74cc63271 [ci skip] Fix publish release command 2019-02-13 15:27:06 -05:00
4 changed files with 8 additions and 22 deletions

6
.github/deploy vendored
View File

@@ -114,8 +114,10 @@ var defaultSwiftVersion: String {
func podspec(repo: Repo, user: User, pkg: Package) -> (Substring, String) { func podspec(repo: Repo, user: User, pkg: Package) -> (Substring, String) {
let (owner, name) = { ($0[0], $0[1]) }(slug.split(separator: "/")) let (owner, name) = { ($0[0], $0[1]) }(slug.split(separator: "/"))
let swiftVersion = pkg.swiftLanguageVersions.max() ?? defaultSwiftVersion let swiftVersion = pkg.swiftLanguageVersions.min() ?? defaultSwiftVersion
let sources = pkg.targets.filter{ $0.type == .regular }.compactMap{ $0.path }.first! 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, """ return (name, """
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = '\(name)' s.name = '\(name)'

View File

@@ -80,4 +80,4 @@ jobs:
install: brew install mxcl/made/swift-sh install: brew install mxcl/made/swift-sh
before_script: .github/deploy generate-podspec before_script: .github/deploy generate-podspec
script: pod trunk push script: pod trunk push
after_success: .github/deploy post-release after_success: .github/deploy publish-release

View File

@@ -1,7 +1,7 @@
// swift-tools-version:4.2 // swift-tools-version:4.2
import PackageDescription import PackageDescription
let package = Package( let pkg = Package(
name: "Path.swift", name: "Path.swift",
products: [ products: [
.library(name: "Path", targets: ["Path"]), .library(name: "Path", targets: ["Path"]),
@@ -9,5 +9,6 @@ let package = Package(
targets: [ targets: [
.target(name: "Path", path: "Sources"), .target(name: "Path", path: "Sources"),
.testTarget(name: "PathTests", dependencies: ["Path"]), .testTarget(name: "PathTests", dependencies: ["Path"]),
] ],
swiftLanguageVersions: [.v4, .v4_2, .version("5")]
) )

View File

@@ -1,17 +0,0 @@
// swift-tools-version:5.0
import PackageDescription
let pkg = Package(
name: "Path.swift",
products: [
.library(name: "Path", targets: ["Path"]),
],
targets: [
.target(name: "Path", path: "Sources"),
.testTarget(name: "PathTests", dependencies: ["Path"]),
]
)
pkg.swiftLanguageVersions = [
.v4_2, .v5
]