Skip to content

Commit

Permalink
support cocoapods (#3)
Browse files Browse the repository at this point in the history
* wip

* update workflow

* update

* fix big sur pipeline

* use swift 5.4

* update

* update
  • Loading branch information
wendyliga committed Sep 8, 2022
1 parent e4f0f5b commit 009c8d2
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 23 deletions.
40 changes: 22 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,55 @@ on:
- '*'

jobs:
build_big_sur:
build-big-sur:
strategy:
matrix:
xcode:
- '13.0'
- '13.2.1'
- '12.5.1'
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run build
- name: Run Build
run: swift build
build_monterey:
unit_test-big-sur:
strategy:
matrix:
xcode:
- '13.1'
- '13.4'
runs-on: macos-12
- '12.5.1'
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run build
run: swift build
unit_test_big_sur:
- name: Run tests
run: swift test --enable-test-discovery --enable-code-coverage | xcpretty
build-monterey:
strategy:
matrix:
xcode:
- '13.0'
- '13.2.1'
runs-on: macos-11
- '13.1'
- '13.2.1'
- '13.3.1'
- '13.4.1'
- '14.0'
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run tests
run: swift test --enable-test-discovery --enable-code-coverage | xcpretty
unit_test_monterey:
- name: Run Build
run: swift build
unit_test-monterey:
strategy:
matrix:
xcode:
- '13.1'
- '13.4'
- '13.2.1'
- '13.3.1'
- '13.4.1'
- '14.0'
runs-on: macos-12
steps:
- uses: actions/checkout@v2
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/podspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Podspec

on:
push:
branches:
- main
pull_request:
branches:
- '*'

jobs:
linting:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Install Cocoapods
run: gem install cocoapods
- name: Run linting
run: pod spec lint TPTweak.podspec
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

# 1.0.0
- initial release
3 changes: 0 additions & 3 deletions Example/Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,3 @@ class ViewController: UIViewController {
"""
}
}


UIViewController().navigationController?.pushViewController(<#T##viewController: UIViewController##UIViewController#>, animated: <#T##Bool#>)
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.5
// swift-tools-version: 5.4
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -18,6 +18,7 @@ let package = Package(
),
.testTarget(
name: "TPTweakTests",
dependencies: ["TPTweak"]),
dependencies: ["TPTweak"]
),
]
)
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ or manually add to your `Package.swift`
.package(url: "https://github.com/tokopedia/ios-tptweak", from: "1.0.0"),
```

# Cocoapods
add this to your `Podfile`
```
pod 'TPTweak', '~> 1.0.0'
```

# Nomenclature
`TPTweakEntry` = Representation of option on TPTweak

Expand Down
15 changes: 15 additions & 0 deletions TPTweak.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Pod::Spec.new do |spec|
spec.name = "TPTweak"
spec.version = "1.0.0"
spec.summary = "TPTweak is a debugging tool to help adjust your iOS app on the fly without recompile"

spec.license = { :type => "Apache 2.0", :file => "LICENSE.md" }
spec.author = { "Wendy Liga" => "[email protected]" }
spec.homepage = "https://github.com/tokopedia/ios-tptweak"

spec.platform = :ios, "11.0"
spec.swift_versions = ["5.4"]
spec.source = { :git => "https://github.com/tokopedia/ios-tptweak.git", :tag => "#{spec.version}" }
spec.source_files = "Sources/TPTweak/**/*.swift"

end

0 comments on commit 009c8d2

Please sign in to comment.