From 7cd1e1bd713d78cd156b487942b072c4ffc8b161 Mon Sep 17 00:00:00 2001 From: Erik Terwan Date: Thu, 31 Mar 2022 16:55:58 +0200 Subject: [PATCH] Add auto generated documentation --- .github/workflows/document.yml | 53 +++++++++++++++++++ .gitignore | 7 ++- MMMCommonCore.podspec | 4 +- .../include/MMMCommonCoreObjC.h | 4 -- 4 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/document.yml diff --git a/.github/workflows/document.yml b/.github/workflows/document.yml new file mode 100644 index 0000000..9705a92 --- /dev/null +++ b/.github/workflows/document.yml @@ -0,0 +1,53 @@ +name: AutoRelease + +on: + push: + tags: + - "*" + + workflow_dispatch: + +jobs: + tagged-release: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + + - name: Wait for build to succeed + uses: fountainhead/action-wait-for-check@v1.0.0 + id: wait-for-build + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: Build iOS + ref: ${{ github.event.pull_request.head.sha || github.sha }} + + - name: Wait for test to succeed + if: steps.wait-for-build.outputs.conclusion == 'success' + uses: fountainhead/action-wait-for-check@v1.0.0 + id: wait-for-test + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: Test iOS + ref: ${{ github.event.pull_request.head.sha || github.sha }} + - name: Install Sourcekitten + run: brew install sourcekitten + + - name: Install Jazzy + run: gem install jazzy + + - name: Build Swift docs + run: | + sourcekitten doc --spm --module-name MMMCommonCore > swiftDoc.json + + - name: Build ObjC docs + run: | + sourcekitten doc --objc $(pwd)/Sources/MMMCommonCoreObjC/include/MMMCommonCoreObjC.h \ + -- -x objective-c -isysroot $(xcrun --show-sdk-path --sdk iphonesimulator) \ + -I $(pwd) -fmodules > objcDoc.json + + - name: Publish + uses: JamesIves/github-pages-deploy-action@v4.2.5 + with: + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore index ef094a2..01b157d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,9 @@ /Packages /*.xcodeproj xcuserdata/ -/.swiftpm \ No newline at end of file +/.swiftpm + +# Jazzy +docs/ +objcDoc.json +swiftDoc.json \ No newline at end of file diff --git a/MMMCommonCore.podspec b/MMMCommonCore.podspec index 1a47868..55b579b 100644 --- a/MMMCommonCore.podspec +++ b/MMMCommonCore.podspec @@ -6,7 +6,7 @@ Pod::Spec.new do |s| s.name = "MMMCommonCore" - s.version = "1.8.3" + s.version = "1.8.4" s.summary = "Small bits and pieces reused in many pods from MMMTemple" s.description = s.summary s.homepage = "https://github.com/mediamonks/#{s.name}" @@ -21,6 +21,7 @@ Pod::Spec.new do |s| s.subspec 'ObjC' do |ss| ss.source_files = [ "Sources/#{s.name}ObjC/*.{h,m}" ] + ss.exclude_files = [ "Sources/#{s.name}ObjC/include/#{s.name}ObjC.h" ] end s.swift_versions = '5.4' @@ -28,6 +29,7 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" } + s.subspec 'Swift' do |ss| ss.source_files = [ "Sources/#{s.name}/*.swift" ] ss.dependency "#{s.name}/ObjC" diff --git a/Sources/MMMCommonCoreObjC/include/MMMCommonCoreObjC.h b/Sources/MMMCommonCoreObjC/include/MMMCommonCoreObjC.h index e2935f9..02b7a3e 100644 --- a/Sources/MMMCommonCoreObjC/include/MMMCommonCoreObjC.h +++ b/Sources/MMMCommonCoreObjC/include/MMMCommonCoreObjC.h @@ -3,10 +3,6 @@ // Copyright (C) 2016-2020 MediaMonks. All rights reserved. // -#if SWIFT_PACKAGE - #import "../MMMCommonCore.h" #import "../MMMNetworkConditioner.h" #import "../MMMWeakProxy.h" - -#endif