Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2880aa556b | ||
|
|
a125a871f5 | ||
|
|
d79844cf2b | ||
|
|
d0648411ea | ||
|
|
e74cc63271 |
6
.github/deploy
vendored
6
.github/deploy
vendored
@@ -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)'
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,9 +9,6 @@ let pkg = 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, .v5]
|
||||||
)
|
)
|
||||||
|
|
||||||
pkg.swiftLanguageVersions = [
|
|
||||||
.v4_2, .v5
|
|
||||||
]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user