Skip to content

Commit

Permalink
Fixed build error bash script extension on linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilker özcan committed Sep 3, 2016
1 parent 7606702 commit 75a453d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Extensions/BashScriptHandler/BashScriptHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,12 @@ public class BashScriptHandler: AppHandlers {

let strippedResponse = response.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
do {
#if os(Linux)
let internalExpression = try RegularExpression(pattern: "OK", options: .caseInsensitive)
#else
let internalExpression = try NSRegularExpression(pattern: "OK", options: .caseInsensitive)
#endif

let matches = internalExpression.matches(in: strippedResponse, options: .reportProgress, range:NSMakeRange(0, strippedResponse.characters.count))

if(matches.count > 0) {
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion Travis/Build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [[ $TEST_BRANCH == $TRAVIS_BRANCH ]]; then
SWIFT_PATH='/usr/local/swift/bin'
fi

docker run -e "OS_RELEASE=${DOCKER_OS_RELEASE}" -e "PATH=${SWIFT_PATH}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -e "TRAVIS_COMMIT=${TRAVIS_COMMIT}" -e "TRAVIS_IMAGE=${TRAVIS_IMAGE}" ilk3r/iorunner:${DOCKER_IMAGE} /bin/bash -c "cd /root/ilk33r/IORunner/; git pull; make dist-clean; make dist; make deploy;"
docker run -e "OS_RELEASE=${DOCKER_OS_RELEASE}" -e "PATH=${SWIFT_PATH}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -e "TRAVIS_COMMIT=${TRAVIS_COMMIT}" -e "TRAVIS_IMAGE=${TRAVIS_IMAGE}" ilk3r/iorunner:${DOCKER_IMAGE} /bin/bash -c "cd /root/ilk33r/IORunner/; git reset --hard origin/master; git pull; make dist-clean; make dist; make deploy;"

else
make dist-clean
Expand Down

0 comments on commit 75a453d

Please sign in to comment.