Skip to content

Commit

Permalink
Merge pull request #18 from crossroadlabs/develop
Browse files Browse the repository at this point in the history
Linux support
  • Loading branch information
dileping committed Feb 18, 2016
2 parents db1c8cc + 25a0f22 commit b8d8df5
Show file tree
Hide file tree
Showing 15 changed files with 258 additions and 163 deletions.
94 changes: 62 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,65 @@
language: objective-c
osx_image: xcode7.2
env:
global:
- FRAMEWORK_NAME=Regex
- secure: hsSJ4btmCIbNjAPyAOZvCAUUbupx9Obo0YIXkrQ/iteC4oWRv0g4TMh9Ie/zg9Cdn8P6QOlV2waoG4ZdCymW08/MASK5+Z+uRqAuAExF2l0NllbVTymEDKHkzGdId9EN4thj10TXrsq8kfTWg8O1As3r2Nl/H2lBmDK49DHZVU2cNl9EbgmALYS7CoZ2LwM/TnJgSvUB4l0yzPyz4veDNAgRvQ9iMXN1/gHsemZdcxrd9q3ce53+PRap2z9NUGQrpAefXCLjN8M8aKHExgr90aUxGz4DoHm+pRppMqFo9hIjEi0WQc+ikD3ExchxQH6LCCdTF20L5L0Sxj3AzhUsojDtB5zG9Rc8O/1UjzbcuHbdr0PC+0mSFuQzYsG009Zg1i6moeattmQOC/F/QYp/cXdlHT9K9T4dqh62Wp9lU/CeigJ6orKR9NgBuxEDOsObzNVoiRsqBn4fEOE2b+24XB7D8u4Twc7koRB1gG96JUFNWm5pSmM1WDzTJIlHTcxiU4iHMV/19mWnzJhYTLSXhXOhG1lO2FddeRlkKCuklWqcKvWWr6FnFA2uFxp17hM6YfVsvhDQiJ3Xd/byuNIVgkDuL80Jo/v7dkM8tElYeJsRGiRkZLtkOlIiRnWYTeFclNNSzJ14Ub/MT5W6wfEm/nqeY2G0w50Peu362XL2rFs=
before_install:
- brew update
- brew unlink carthage
- brew install carthage
- brew link carthage
before_script:
# bootstrap the dependencies for the project
# you can remove if you don't have dependencies
# - carthage bootstrap
before_deploy:
- carthage build --no-skip-current
- carthage archive $FRAMEWORK_NAME
- pod trunk push CrossroadRegex.podspec
script:
- xcodebuild test -project Regex.xcodeproj -scheme Regex-OSX
- xcodebuild test -project Regex.xcodeproj -scheme Regex-iOS -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6'
- xcodebuild test -project Regex.xcodeproj -scheme Regex-tvOS -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV 1080p'
- xcodebuild build -project Regex.xcodeproj -scheme Regex-watchOS -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch - 42mm'
global:
- MODULE_NAME=Regex
matrix:
include:
- script:
- xcodebuild test -project $MODULE_NAME.xcodeproj -scheme $MODULE_NAME-OSX
- xcodebuild test -project $MODULE_NAME.xcodeproj -scheme $MODULE_NAME-iOS -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6'
- xcodebuild test -project $MODULE_NAME.xcodeproj -scheme $MODULE_NAME-tvOS -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV 1080p'
- xcodebuild build -project $MODULE_NAME.xcodeproj -scheme $MODULE_NAME-watchOS -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch - 42mm'
os: osx
osx_image: xcode7.2
language: objective-c
env:
- secure: hsSJ4btmCIbNjAPyAOZvCAUUbupx9Obo0YIXkrQ/iteC4oWRv0g4TMh9Ie/zg9Cdn8P6QOlV2waoG4ZdCymW08/MASK5+Z+uRqAuAExF2l0NllbVTymEDKHkzGdId9EN4thj10TXrsq8kfTWg8O1As3r2Nl/H2lBmDK49DHZVU2cNl9EbgmALYS7CoZ2LwM/TnJgSvUB4l0yzPyz4veDNAgRvQ9iMXN1/gHsemZdcxrd9q3ce53+PRap2z9NUGQrpAefXCLjN8M8aKHExgr90aUxGz4DoHm+pRppMqFo9hIjEi0WQc+ikD3ExchxQH6LCCdTF20L5L0Sxj3AzhUsojDtB5zG9Rc8O/1UjzbcuHbdr0PC+0mSFuQzYsG009Zg1i6moeattmQOC/F/QYp/cXdlHT9K9T4dqh62Wp9lU/CeigJ6orKR9NgBuxEDOsObzNVoiRsqBn4fEOE2b+24XB7D8u4Twc7koRB1gG96JUFNWm5pSmM1WDzTJIlHTcxiU4iHMV/19mWnzJhYTLSXhXOhG1lO2FddeRlkKCuklWqcKvWWr6FnFA2uFxp17hM6YfVsvhDQiJ3Xd/byuNIVgkDuL80Jo/v7dkM8tElYeJsRGiRkZLtkOlIiRnWYTeFclNNSzJ14Ub/MT5W6wfEm/nqeY2G0w50Peu362XL2rFs=
before_install:
- brew update
- brew unlink carthage
- brew install carthage
- brew link carthage
before_script:
# bootstrap the dependencies for the project
# you can remove if you don't have dependencies
# - carthage bootstrap
before_deploy:
- carthage build --no-skip-current
- carthage archive $MODULE_NAME
- pod trunk push CrossroadRegex.podspec
deploy:
provider: releases
api_key:
secure: bln+wxsxX4fV0egcGEnF4VJpQBBos+ZqqnO8j88HVeVqTVKjrcnICalowX8nxwX6KhXqnuZNZWacc4bl4bLbIlAns1EgxhsR/N0qeMnp0SpSasBUSulWSaC8R4G7I6hxtScxZhh3BtZbJq3iYMGNj27LhpKaTpXGWxk4YOWmZEm19v8vUrXBI7qPYLRbnlHXx8DwOC3vjotSlIMyNGBlmC/npZ3A3QH2CLZSW8seXEhSlTUzbQ9gY5nNs7/rjmDhkRnNtEnvEuZdUix5SuCD5WO7VMYY7+Y+O3XyGjeIrd22B04DXyL70XrfTjbFGaQAt7uRYXWbd9M4ONo762Ee5boRNCJKolD6hVzUp0eRY3cLZgGIoZDMqUXEX5N4ZF1PbULKyEWGfavB7kzLx1kw4P6unYJW5gZR3blreij+eaN9HAVGNzf++c7vGhbwiE+zsoRZEiriEtii/hRZZ//czmeiFn7t0TQo/PozEu9lSaRSeGsUXseX12lWg9VCAYADvVV1PIIkb/FfQ76WRtP8BMJgu/yjUSB7ZxDxkB4zPvJNRuD/V7z9HTD9GNEyRuAdpiJy++dVyjRkW/xMfbPTkUCp0AdqdzL4L8orF7Ur9v+o3mlzKMTtmWxFhNo0dhAK4WC/jdNVKxbpV9ObG9Ew4+Hi43a7r4yxneNZWA1SikM=
file: $MODULE_NAME.framework.zip
skip_cleanup: true
on:
repo: crossroadlabs/Regex
tags: true
- script:
# build (yes for now swift-build should be like this)
- export SBCMD=`which swift-build`
- $SBCMD
# test
- swift test
sudo: required
dist: trusty
language: generic
before_install:
# install original swift distribution
- wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
- cd ..
- export SWIFT_VERSION=swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a
- wget https://swift.org/builds/development/ubuntu1404/$SWIFT_VERSION/$SWIFT_VERSION-ubuntu14.04.tar.gz
- tar xzf $SWIFT_VERSION-ubuntu14.04.tar.gz
- export PATH="${PWD}/${SWIFT_VERSION}-ubuntu14.04/usr/bin:${PATH}"
# install latest package manager with `swift-test`
- git clone https://github.com/apple/swift-package-manager
- cd swift-package-manager
- Utilities/bootstrap
- export SWIFT_BUILD_PATH=`pwd`
- export PATH=$SWIFT_BUILD_PATH/.build/debug:$PATH
- cd ..
# get back home
- cd $MODULE_NAME
notifications:
email: false
deploy:
provider: releases
api_key:
secure: bln+wxsxX4fV0egcGEnF4VJpQBBos+ZqqnO8j88HVeVqTVKjrcnICalowX8nxwX6KhXqnuZNZWacc4bl4bLbIlAns1EgxhsR/N0qeMnp0SpSasBUSulWSaC8R4G7I6hxtScxZhh3BtZbJq3iYMGNj27LhpKaTpXGWxk4YOWmZEm19v8vUrXBI7qPYLRbnlHXx8DwOC3vjotSlIMyNGBlmC/npZ3A3QH2CLZSW8seXEhSlTUzbQ9gY5nNs7/rjmDhkRnNtEnvEuZdUix5SuCD5WO7VMYY7+Y+O3XyGjeIrd22B04DXyL70XrfTjbFGaQAt7uRYXWbd9M4ONo762Ee5boRNCJKolD6hVzUp0eRY3cLZgGIoZDMqUXEX5N4ZF1PbULKyEWGfavB7kzLx1kw4P6unYJW5gZR3blreij+eaN9HAVGNzf++c7vGhbwiE+zsoRZEiriEtii/hRZZ//czmeiFn7t0TQo/PozEu9lSaRSeGsUXseX12lWg9VCAYADvVV1PIIkb/FfQ76WRtP8BMJgu/yjUSB7ZxDxkB4zPvJNRuD/V7z9HTD9GNEyRuAdpiJy++dVyjRkW/xMfbPTkUCp0AdqdzL4L8orF7Ur9v+o3mlzKMTtmWxFhNo0dhAK4WC/jdNVKxbpV9ObG9Ew4+Hi43a7r4yxneNZWA1SikM=
file: $FRAMEWORK_NAME.framework.zip
skip_cleanup: true
on:
repo: crossroadlabs/Regex
tags: true
2 changes: 1 addition & 1 deletion CrossroadRegex.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'CrossroadRegex'
s.version = '0.4.1'
s.version = '0.5'
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
s.summary = 'Easy, portable and feature reach Regular Expressions for Swift'
s.homepage = 'https://github.com/crossroadlabs/Regex'
Expand Down
26 changes: 26 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//===--- Package.swift ----------------------------------------------------===//
//Copyright (c) 2016 Daniel Leping (dileping)
//
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//===----------------------------------------------------------------------===//

import PackageDescription

let package = Package(
name: "Regex",
targets: [
Target(
name: "Regex"
)
]
)
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
# Regex

![🐧 linux: ready](https://img.shields.io/badge/%F0%9F%90%A7%20linux-ready-red.svg)
[![GitHub license](https://img.shields.io/badge/license-Apache 2.0-lightgrey.svg)](https://raw.githubusercontent.com/crossroadlabs/Regex/master/LICENSE)
[![Build Status](https://travis-ci.org/crossroadlabs/Regex.svg?branch=master)](https://travis-ci.org/crossroadlabs/Regex)
[![GitHub release](https://img.shields.io/github/release/crossroadlabs/Regex.svg)](https://github.com/crossroadlabs/Regex/releases)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![CocoaPods version](https://img.shields.io/cocoapods/v/CrossroadRegex.svg)](https://cocoapods.org/pods/CrossroadRegex)
![Platform OS X | iOS | tvOS | watchOS](https://img.shields.io/badge/platform-OS%20X%20%7C%20iOS%20%7C%20tvOS%20%7C%20watchOS-orange.svg)
![Platform OS X | iOS | tvOS | watchOS | Linux](https://img.shields.io/badge/platform-Linux%20%7C%20OS%20X%20%7C%20iOS%20%7C%20tvOS%20%7C%20watchOS-orange.svg)

## Advanced regular expressions for Swift

## Getting started

### Installation

#### [Package Manager](https://swift.org/package-manager/)

Add the following dependency to your [Package.swift](https://github.com/apple/swift-package-manager/blob/master/Documentation/Package.swift.md):

```swift
.Package(url: "https://github.com/ypopovych/Regex.git", majorVersion: 1)
```

Run ```swift build``` and build your app. Package manager is supported on OS X, but it's still recommended to be used on Linux only.

#### [CocoaPods](http://cocoapods.org/)
Add the following to your [Podfile](http://guides.cocoapods.org/using/the-podfile.html):

Expand Down Expand Up @@ -121,10 +132,12 @@ Regex framework was mainly introduced to fulfill the needs of [Swift Express](ht

## Roadmap

* v0.5: alternative PCRE based implementation (OS X, Linux)
* v1.0: full Linux support
* v1.0: stable release (once we will see that no issues are coming)

## Changelog
* v0.5
* package manager support
* full linux support 🐧
* v0.4.1
* support for optionally present groups
* v0.4
Expand Down
Loading

0 comments on commit b8d8df5

Please sign in to comment.