Dynamic Members

This commit is contained in:
Max Howell
2019-01-22 14:05:33 -05:00
parent 44be1c45a9
commit 859164e59f
5 changed files with 41 additions and 5 deletions

View File

@@ -89,11 +89,18 @@ jobs:
- name: CocoaPods
before_install: |
DESCRIPTION=$(swift - <<EOF
import Foundation
struct Response: Decodable { let description: String }
let url = URL(string: "https://api.github.com/repos/mxcl/Path.swift")!
let data = try Data(contentsOf: url)
print(try JSONDecoder().decode(Response.self, from: data).description)
EOF)
cat <<\ \ EOF> Path.swift.podspec
Pod::Spec.new do |s|
s.name = 'Path.swift'
s.version = 'TRAVIS_TAG'
s.summary = 'Delightful, robust file-pathing functions'
s.summary = 'DESCRIPTION'
s.homepage = 'https://github.com/mxcl/Path.swift'
s.license = { :type => 'Unlicense', :file => 'LICENSE.md' }
s.author = { 'mxcl' => 'mxcl@me.com' }
@@ -108,6 +115,7 @@ jobs:
end
EOF
sed -i '' "s/TRAVIS_TAG/$TRAVIS_TAG/" Path.swift.podspec
sed -i '' "s/DESCRIPTION/$DESCRIPTION/" Path.swift.podspec
# ^^ see the Jazzy deployment for explanation
install: gem install cocoapods --pre
script: pod trunk push