3
3
#
4
4
# make test - Run all tests but performance tests
5
5
# make test_performance - Run performance tests
6
- # make documentation - Generate jazzy documentation
6
+ # make doc - Generate DocC documentation
7
7
# make clean - Remove build artifacts
8
8
# make distclean - Restore repository to a pristine state
9
9
@@ -15,10 +15,8 @@ smokeTest: test_framework_GRDBiOS_maxTarget test_framework_GRDBiOS_minTarget tes
15
15
#
16
16
# Xcode
17
17
# CocoaPods - https://cocoapods.org
18
- # Jazzy - https://github.com/realm/jazzy
19
18
20
19
GIT := $(shell command -v git)
21
- JAZZY := $(shell command -v jazzy)
22
20
POD := $(shell command -v pod)
23
21
XCRUN := $(shell command -v xcrun)
24
22
XCODEBUILD := set -o pipefail && $(shell command -v xcodebuild)
@@ -41,6 +39,7 @@ ifeq ($(TRAVIS),true)
41
39
COCOAPODS_EXTRA_TIME = --verbose
42
40
endif
43
41
42
+ DOCS_PATH = Documentation/Reference
44
43
45
44
# Tests
46
45
# =====
@@ -483,11 +482,11 @@ SQLiteCustom/src/sqlite3.h:
483
482
# Documentation
484
483
# =============
485
484
486
- docs -localhost :
485
+ doc -localhost :
487
486
# Generates documentation in ~/Sites/GRDB
488
487
# See https://discussions.apple.com/docs/DOC-3083 for Apache setup on the mac
489
488
mkdir -p ~ /Sites/GRDB
490
- GRDB_DOCC_PLUGIN=1 swift package \
489
+ GRDB_DOCC_PLUGIN=1 $( SWIFT ) package \
491
490
--allow-writing-to-directory ~ /Sites/GRDB \
492
491
generate-documentation \
493
492
--output-path ~ /Sites/GRDB \
@@ -498,25 +497,17 @@ docs-localhost:
498
497
open " http://localhost/~$( USER) /GRDB/documentation/grdb/"
499
498
500
499
doc :
501
- ifdef JAZZY
502
- $(JAZZY) \
503
- --clean \
504
- --author 'Gwendal Roué' \
505
- --author_url https://github.com/groue \
506
- --source-host github \
507
- --source-host-url https://github.com/groue/GRDB.swift \
508
- --source-host-files-url https://github.com/groue/GRDB.swift/tree/v6.2.0 \
509
- --module-version 6.2.0 \
510
- --module GRDB \
511
- --root-url http://groue.github.io/GRDB.swift/docs/6.2/ \
512
- --output Documentation/Reference \
513
- --swift-build-tool xcodebuild \
514
- --undocumented-text '' \
515
- --xcodebuild-arguments -project,GRDB.xcodeproj,-scheme,GRDB
516
- else
517
- @echo Jazzy must be installed for doc
518
- @exit 1
519
- endif
500
+ # https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/publishing-to-github-pages/
501
+ rm -rf $(DOCS_PATH )
502
+ mkdir -p $(DOCS_PATH )
503
+ GRDB_DOCC_PLUGIN=1 $(SWIFT ) package \
504
+ --allow-writing-to-directory $(DOCS_PATH ) \
505
+ generate-documentation \
506
+ --output-path $(DOCS_PATH ) \
507
+ --target GRDB \
508
+ --disable-indexing \
509
+ --transform-for-static-hosting \
510
+ --hosting-base-path GRDB.swift/docs/6.3
520
511
521
512
522
513
# Cleanup
@@ -530,7 +521,7 @@ distclean:
530
521
clean :
531
522
$(SWIFT ) package reset
532
523
cd Tests/SPM && $(SWIFT ) package reset
533
- rm -rf Documentation/Reference
524
+ rm -rf $( DOCS_PATH )
534
525
find . -name Package.resolved | xargs rm -f
535
526
536
527
.PHONY : distclean clean doc test smokeTest SQLiteCustom
0 commit comments