-
Notifications
You must be signed in to change notification settings - Fork 74
/
Makefile
45 lines (36 loc) · 2.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
ODOCS=../SwiftGodotDocs/docs
all:
echo Targets:
echo - build-docs: Builds the documentation
echo - preview-docs: Start local web server serving the documentation
echo - push-docs: Pushes the existing documentation, requires SwiftGodotDocs peer checked out
echo - release: Builds an xcframework package, documentation and pushes documentation
echo - sync: synchronizes the Macro system to the ../SwiftGodotBinary module
build-docs:
GENERATE_DOCS=1 DOCC_HTML_DIR=/Users/miguel/cvs/swift-docc-render-artifact/dist swift package \
--allow-writing-to-directory $(ODOCS) \
generate-documentation \
--target SwiftGodot \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path /SwiftGodotDocs \
--source-service github \
--source-service-base-url https://github.com/migueldeicaza/SwiftGodot/blob/main \
--checkout-path . \
--emit-digest \
--output-path $(ODOCS) \
--verbose \
>& build-docs.log
preview-docs:
GENERATE_DOCS=1 swift package --disable-sandbox preview-documentation --target SwiftGodot --disable-indexing --emit-digest
push-docs:
cp scripts/google1fb990296a5c506c.html ../SwiftGodotDocs/docs/documentation/swiftgodot/
(cd ../SwiftGodotDocs/docs/; find . -name '*html' | sed -e 's,^.,https://migueldeicaza.github.io/SwiftGodotDocs,') > ../SwiftGodotDocs/docs/documentation/swiftgodot/sitemap.txt
(cd ../SwiftGodotDocs; mv docs tmp; git reset --hard 8b5f69a631f42a37176a040aeb5cfa1620249ff1; mv tmp docs; touch .nojekyll docs/.nojekyll; git add docs/* .nojekyll docs/.nojekyll; git commit -m "Import Docs"; git push -f; git prune)
release: check-args build-release build-docs push-docs
build-release: check-args
sh -x scripts/release $(VERSION) $(NOTES) `git rev-parse HEAD`
check-args:
@if test x$(VERSION)$(NOTES) = x; then echo You need to provide both VERSION=XX NOTES=FILENAME arguments to this makefile target; exit 1; fi
sync:
@if test ../SwiftGodotBinary; then rsync -a Sources/SwiftGodotMacroLibrary ../SwiftGodotBinary/Sources; else echo "missing directory ../SwiftGodotBinary"; fi