Skip to content

Commit

Permalink
Mark Swift 5 as supported (realm#2730)
Browse files Browse the repository at this point in the history
* Mark Swift 5 as supported

* Only set a single Swift version on podspec

Multiple swift versions requires CocoaPods 1.7.0, which is still
in beta.

* Modernize ruby hash syntax

* Update SourceKitten to 0.23.1
  • Loading branch information
jpsim authored Apr 29, 2019
1 parent 27bd825 commit acfc592
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.1
5.0
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "jpsim/SourceKitten" ~> 0.23.0
github "jpsim/SourceKitten" ~> 0.23.1
github "scottrhoyt/SwiftyTextTable" ~> 0.9.0
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github "Carthage/Commandant" "0.16.0"
github "antitypical/Result" "4.1.0"
github "drmohundro/SWXMLHash" "4.8.0"
github "jpsim/SourceKitten" "0.23.0"
github "jpsim/SourceKitten" "0.23.1"
github "jpsim/Yams" "2.0.0"
github "jspahrsummers/xcconfigs" "0.12"
github "scottrhoyt/SwiftyTextTable" "0.9.0"
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ display_compilation_time:

publish:
brew update && brew bump-formula-pr --tag=$(shell git describe --tags) --revision=$(shell git rev-parse HEAD) swiftlint
pod trunk push SwiftLintFramework.podspec --swift-version=4.2
pod trunk push SwiftLint.podspec --swift-version=4.2
pod trunk push SwiftLintFramework.podspec
pod trunk push SwiftLint.podspec

get_version:
@echo $(VERSION_STRING)
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Carthage/Commandant.git", .upToNextMinor(from: "0.16.0")),
.package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.23.0"),
.package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.23.1"),
.package(url: "https://github.com/jpsim/Yams.git", from: "2.0.0"),
.package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", from: "0.9.0"),
] + (addCryptoSwift ? [.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "1.0.0")] : []),
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Here's a reference of which SwiftLint version to use for a given Swift version.
| Swift 2.x | SwiftLint 0.18.1 |
| Swift 3.x | SwiftLint 0.25.1 |
| Swift 4.0-4.1.x | SwiftLint 0.28.2 |
| Swift 4.2+ | Latest |
| Swift 4.2.x-5.0 | Latest |

## Rules

Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ $ TOOLCHAINS=com.apple.dt.toolchain.Swift_2_3 swiftlint autocorrect
| Swift 2.x | SwiftLint 0.18.1 |
| Swift 3.x | SwiftLint 0.25.1 |
| Swift 4.0-4.1.x | SwiftLint 0.28.2 |
| Swift 4.2+ | 最新的 |
| Swift 4.2.x-5.0 | 最新的 |

## 规则

Expand Down
4 changes: 2 additions & 2 deletions SwiftLint.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Pod::Spec.new do |s|
s.version = `make get_version`
s.summary = 'A tool to enforce Swift style and conventions.'
s.homepage = 'https://github.com/realm/SwiftLint'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.license = { type: 'MIT', file: 'LICENSE' }
s.author = { 'JP Simard' => '[email protected]' }
s.source = { :http => "#{s.homepage}/releases/download/#{s.version}/portable_swiftlint.zip" }
s.source = { http: "#{s.homepage}/releases/download/#{s.version}/portable_swiftlint.zip" }
s.preserve_paths = '*'
s.exclude_files = '**/file.zip'
end
5 changes: 3 additions & 2 deletions SwiftLintFramework.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ Pod::Spec.new do |s|
s.version = `make get_version`
s.summary = 'A tool to enforce Swift style and conventions.'
s.homepage = 'https://github.com/realm/SwiftLint'
s.source = { :git => s.homepage + '.git', :tag => s.version }
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.source = { git: s.homepage + '.git', tag: s.version }
s.license = { type: 'MIT', file: 'LICENSE' }
s.author = { 'JP Simard' => '[email protected]' }
s.platform = :osx, '10.10'
s.source_files = 'Source/SwiftLintFramework/**/*.swift'
s.swift_version = '5.0' # TODO: Add Swift 4.2 when CocoaPods 1.7.0 is out.
s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }
s.dependency 'SourceKittenFramework', '~> 0.23'
s.dependency 'Yams', '~> 2.0'
Expand Down

0 comments on commit acfc592

Please sign in to comment.