From d911388cb978057da0f7770ed121b23cd893e510 Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" Date: Mon, 11 Apr 2022 19:17:27 +0100 Subject: [PATCH] Move from "rebar3 edoc" to "rebar3_ex_doc" --- .github/workflows/ci.yml | 4 +++- .gitignore | 1 + CHANGELOG.md | 4 +++- Makefile | 16 ++++++++++------ doc/.gitignore | 3 --- rebar.config | 17 +++++++++++++---- 6 files changed, 30 insertions(+), 15 deletions(-) delete mode 100644 doc/.gitignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b9030e..7042740 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: id: setup-beam with: otp-version: ${{matrix.otp_vsn}} - rebar3-version: '3.16' + rebar3-version: '3.18' - name: restore _build uses: actions/cache@v2 with: @@ -33,3 +33,5 @@ jobs: path: ~/.cache/rebar3 key: rebar3-cache-for-os-${{runner.os}}-otp-${{steps.setup-beam.outputs.otp-version}}-rebar3-${{steps.setup-beam.outputs.rebar3-version}}-hash-${{hashFiles('rebar.lock')}} - run: make version + - run: make ex_doc-dry + if: ${{matrix.otp_vsn >= 24}} diff --git a/.gitignore b/.gitignore index 0ca403a..4a815a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .rebar3 _build +doc erl_crash.dump log rebar3.crashdump diff --git a/CHANGELOG.md b/CHANGELOG.md index c79b19a..f425472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- `rebar3_hank [Paulo Oliveira] +- `rebar3_hank` [Paulo Oliveira] +- `rebar3_ex_doc` + `make ex_doc-dry` [Paulo Oliveira] ### Changed - CI container approach to `setup-beam` with cache [Paulo Oliveira] +- `edoc`-based doc. to `ex_doc`-based doc. [Paulo Oliveira] ## [1.0.0] - 2021-03-04 diff --git a/Makefile b/Makefile index a0af8c1..d99aa2e 100644 --- a/Makefile +++ b/Makefile @@ -5,11 +5,11 @@ SHELL := bash MAKEFLAGS += --warn-undefined-variables MAKEFLAGS += --no-builtin-rules -version: upgrade clean compile check test edoc +version: upgrade clean compile check test .PHONY: version -upgrade: upgrade-rebar3_lint upgrade-rebar3_hex upgrade-rebar3_hank - @rebar3 do unlock,upgrade +upgrade: upgrade-rebar3_lint upgrade-rebar3_hex upgrade-rebar3_hank upgrade-rebar3_ex_doc + @rebar3 do unlock --all, upgrade --all .PHONY: upgrade upgrade-rebar3_lint: @@ -24,6 +24,10 @@ upgrade-rebar3_hank: @rebar3 plugins upgrade rebar3_hank .PHONY: upgrade-rebar3_hank +upgrade-rebar3_ex_doc: + @rebar3 plugins upgrade rebar3_ex_doc +.PHONY: upgrade-rebar3_ex_doc + clean: @rebar3 clean -a .PHONY: clean @@ -55,6 +59,6 @@ test: .NOTPARALLEL: test .PHONY: test -edoc: - @rebar3 edoc -.PHONY: edoc +ex_doc-dry: + @rebar3 hex publish docs --dry-run +.PHONY: ex_doc-dry diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index 65ff8ff..0000000 --- a/doc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!.gitignore -!overview.edoc diff --git a/rebar.config b/rebar.config index cb7bf87..14c8bdf 100644 --- a/rebar.config +++ b/rebar.config @@ -15,6 +15,7 @@ {deps, []}. {project_plugins, [ + rebar3_ex_doc, rebar3_hank, rebar3_hex, rebar3_lint @@ -60,9 +61,17 @@ ]} ]}. -%% == EDoc == +%% == ex_doc == -{edoc_opts, [ - {includes, ["src"]}, - {preprocess, true} +{ex_doc, [ + {extras, [ + {'README.md', #{ title => <<"Overview">> }}, + {'CHANGELOG.md', #{ title => <<"Changelog">> }} + ]}, + {main, [<<"readme">>]} +]}. +{hex, [ + {doc, #{ + provider => ex_doc + }} ]}.