From 009c8d29bee9dcc063eb74fa28f04a6de27453dd Mon Sep 17 00:00:00 2001 From: Wendy Liga Date: Thu, 8 Sep 2022 14:01:24 +0700 Subject: [PATCH] support cocoapods (#3) * wip * update workflow * update * fix big sur pipeline * use swift 5.4 * update * update --- .github/workflows/ci.yml | 40 +++++++++++++++------------- .github/workflows/podspec.yml | 19 +++++++++++++ CHANGELOG.md | 2 ++ Example/Example/ViewController.swift | 3 --- Package.swift | 5 ++-- README.md | 6 +++++ TPTweak.podspec | 15 +++++++++++ 7 files changed, 67 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/podspec.yml create mode 100644 TPTweak.podspec diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2980720..c8aa010 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/podspec.yml b/.github/workflows/podspec.yml new file mode 100644 index 0000000..4775f4c --- /dev/null +++ b/.github/workflows/podspec.yml @@ -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 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b13789..532302e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,3 @@ +# 1.0.0 +- initial release \ No newline at end of file diff --git a/Example/Example/ViewController.swift b/Example/Example/ViewController.swift index 718f15f..8c4b624 100644 --- a/Example/Example/ViewController.swift +++ b/Example/Example/ViewController.swift @@ -94,6 +94,3 @@ class ViewController: UIViewController { """ } } - - -UIViewController().navigationController?.pushViewController(<#T##viewController: UIViewController##UIViewController#>, animated: <#T##Bool#>) diff --git a/Package.swift b/Package.swift index 79d54f9..8b1869e 100644 --- a/Package.swift +++ b/Package.swift @@ -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 @@ -18,6 +18,7 @@ let package = Package( ), .testTarget( name: "TPTweakTests", - dependencies: ["TPTweak"]), + dependencies: ["TPTweak"] + ), ] ) diff --git a/README.md b/README.md index 861c269..8b07c40 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/TPTweak.podspec b/TPTweak.podspec new file mode 100644 index 0000000..e9e78ff --- /dev/null +++ b/TPTweak.podspec @@ -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" => "wendy.liga@tokopedia.com" } + 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