-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repair SPM support; fix Xcode warnings; bump minimal deployment targe…
…t to iOS 9.0; update CI&CD
- Loading branch information
Aleksandr Zhuhan
committed
Feb 4, 2021
1 parent
5f213c1
commit daaed2a
Showing
16 changed files
with
210 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: CD | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: macOS-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Deploy to Cocoapods | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
run: | | ||
set -eo pipefail | ||
export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) | ||
pod lib lint --allow-warnings | ||
pod trunk push --allow-warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: SPM build | ||
run: swift build | ||
|
||
- name: Lint Podspec | ||
run: | | ||
set -eo pipefail | ||
pod lib lint --allow-warnings --use-libraries | ||
- name: Carthage update | ||
run: ./scripts/carthage.sh build --platform "ios,macos" --no-skip-current |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,86 @@ | ||
// swift-tools-version:5.1 | ||
// swift-tools-version:5.3 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "imglyKit", | ||
defaultLocalization: .resolved(), | ||
platforms: [ | ||
.iOS(.v8), | ||
.macOS(.v10_10) | ||
.iOS(.v9), .macOS(.v10_10), | ||
], | ||
products: [ | ||
.library( | ||
name: "imglyKit", | ||
targets: ["imglyKit"] | ||
) | ||
], | ||
dependencies: [] | ||
dependencies: [], | ||
targets: [ | ||
.target( | ||
name: "imglyKit", | ||
dependencies: ["imglyKit-ObjC"], | ||
path: "imglyKit", | ||
exclude: Exclude.resolved(), | ||
resources: Resource.resolved() | ||
), | ||
.target( | ||
name: "imglyKit-ObjC", | ||
path: "imglyKit/Backend/Processing/ObjC", | ||
publicHeadersPath: "" | ||
) | ||
] | ||
) | ||
|
||
private extension LanguageTag { | ||
static func resolved() -> LanguageTag? { | ||
#if os(iOS) | ||
return .init("en") | ||
#elseif os(macOS) | ||
return nil | ||
#endif | ||
} | ||
} | ||
|
||
private enum Exclude { | ||
static func common() -> [String] { | ||
[ | ||
"Supporting Files", | ||
"Backend/Processing/ObjC" | ||
] | ||
} | ||
|
||
static func platform() -> [String] { | ||
#if os(iOS) | ||
return [] | ||
#elseif os(macOS) | ||
return [ | ||
"Frontend", | ||
] | ||
#endif | ||
} | ||
|
||
static func resolved() -> [String] { | ||
common() + platform() | ||
} | ||
} | ||
|
||
private extension Resource { | ||
static func common() -> [Self] { | ||
[ | ||
.process("Backend/Filter Responses"), | ||
.process("Backend/Fonts") | ||
] | ||
} | ||
|
||
static func platform() -> [Self] { | ||
#if os(iOS) | ||
return [] | ||
#elseif os(macOS) | ||
return [] | ||
#endif | ||
} | ||
|
||
static func resolved() -> [Self] { | ||
common() + platform() | ||
} | ||
} |
Oops, something went wrong.