-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_relm_docs.sh
More file actions
executable file
·51 lines (33 loc) · 970 Bytes
/
build_relm_docs.sh
File metadata and controls
executable file
·51 lines (33 loc) · 970 Bytes
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
46
47
48
49
50
51
#!/usr/bin/env -S bash -euo pipefail
mkdir --parents docs/{stable,next} tmp
pushd tmp
git clone --depth 1 --no-single-branch -- https://github.com/Relm4/Relm4 ./
git switch --detach $(git tag --list --sort "v:refname" | grep -v - | tail -n 1)
# Stable docs
export STABLE=1
find -name "lib.rs" -exec ../append_info.sh {} +
find -name "lib.rs" -exec ../append_doc_feature.sh {} +
cargo update
pushd relm4-components
cargo +nightly doc --all-features -Z rustdoc-scrape-examples
popd
pushd relm4-macros
cargo +nightly doc --all-features
# -Z rustdoc-scrape-examples
popd
cargo +nightly doc --all-features -Z rustdoc-scrape-examples
popd
mv tmp/target/doc/* docs/stable
# Unstable docs
export STABLE=0
pushd tmp
git stash
git switch main
cargo clean --doc
cargo update
find -name "lib.rs" -exec ../append_info.sh {} +
export RUSTDOCFLAGS="--cfg dox"
cargo +nightly doc --all-features -Z rustdoc-scrape-examples
popd
mv tmp/target/doc/* docs/next
rm -rf tmp