Skip to content

Commit

Permalink
Merge pull request #9 from shibapm/set_up_ci
Browse files Browse the repository at this point in the history
Set up ci
  • Loading branch information
f-meloni authored Sep 2, 2019
2 parents 50c5434 + c897f1d commit ec3006d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.2
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
cache:
directories:
# General SwiftPM
- .build
# Danger Swift plugins
- ~/.danger-swift

language: generic

matrix:
include:
- os: osx
osx_image: xcode10
script:
- swift build

- os: linux
language: generic
sudo: required
dist: trusty
install:
- eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
- swiftenv global 4.2
script:
- swift build
2 changes: 1 addition & 1 deletion Sources/PackageConfig/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ enum Package {
}

let range = NSRange(location: 0, length: contents.count)
guard let regex = try? NSRegularExpression(pattern: #"^// swift-tools-version:(?:(\d)\.(\d)(?:\.\d)?)$"#),
guard let regex = try? NSRegularExpression(pattern: "^// swift-tools-version:(?:(\\d)\\.(\\d)(?:\\.\\d)?)$"),
let match = regex.firstMatch(in: contents, options: [], range: range),
let majorRange = Range(match.range(at: 1), in: contents), let major = Int(contents[majorRange]),
let minorRange = Range(match.range(at: 2), in: contents), let minor = Int(contents[minorRange])
Expand Down
Empty file.

0 comments on commit ec3006d

Please sign in to comment.