Skip to content

Commit

Permalink
Merge pull request #7 from mworrell/hex-docs
Browse files Browse the repository at this point in the history
Hex docs
  • Loading branch information
mworrell authored Sep 20, 2024
2 parents 9c2ecec + e079a51 commit 4fbee1a
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 90 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ jobs:
run: make test
- name: XRef
run: make xref
- name: Docs
run: make doc
- name: Dialyzer
run: make dialyzer
13 changes: 8 additions & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ APP := zotonic
REBAR := ./rebar3
REBAR_URL := https://s3.amazonaws.com/rebar3/rebar3
REBAR_OPTS ?=

.PHONY: all doc test shell dialyzer compile upgrade-deps xref edoc edoc_private

# Default target - update sources and call all compile rules in succession
.PHONY: all
all: compile

$(REBAR):
Expand All @@ -18,7 +20,6 @@ $(REBAR):
chmod +x $(REBAR)

# Use Rebar to get, update and compile dependencies
.PHONY: upgrade-deps compile compile shell dialyzer xref test edoc

upgrade-deps: $(REBAR)
$(REBAR) $(REBAR_OPTS) upgrade
Expand All @@ -38,20 +39,23 @@ xref: $(REBAR)
test: $(REBAR)
$(REBAR) $(REBAR_OPTS) ct

doc: $(REBAR)
$(REBAR) ex_doc

edoc: $(REBAR)
$(REBAR) edoc

edoc_private: $(REBAR)
$(REBAR) as doc_private edoc

# Cleaning
.PHONY: clean_logs
.PHONY: clean_logs clean clean_doc dist-clean

clean_logs:
@echo "deleting logs:"
rm -f erl_crash.dump
rm -rf priv/log/*

.PHONY: clean
clean: clean_logs $(REBAR)
@echo "cleaning ebin:"
$(REBAR) $(REBAR_OPTS) clean
Expand All @@ -62,7 +66,6 @@ clean_doc:
@rm -f doc/erlang.png
@rm -f doc/edoc-info

.PHONY: dist-clean
dist-clean: clean
$(REBAR) $(REBAR_OPTS) clean -a
rm -rf _build doc deps
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ There are some known issues that need to be resolved:
[hexdocs]: https://hexdocs.pm/filezcache
[gh]: https://github.com/mworrell/filezcache/actions/workflows/test.yaml
[gh badge]: https://img.shields.io/github/workflow/status/mworrell/filezcache/Test?style=flat-curcle
[erlang version badge]: https://img.shields.io/badge/Supported%20Erlang%2FOTP-22.3%20to%2024.0.1-blue.svg?style=flat-curcle
[erlang version badge]: https://img.shields.io/badge/Supported%20Erlang%2FOTP-22.3%20to%2026-blue.svg?style=flat-curcle
[license]: https://img.shields.io/badge/License-Apache_2.0-blue.svg?logo=apache&logoColor=red "Apache 2.0"
Binary file removed doc/img/logo.png
Binary file not shown.
11 changes: 0 additions & 11 deletions doc/overview.edoc

This file was deleted.

71 changes: 0 additions & 71 deletions doc/style.css

This file was deleted.

14 changes: 12 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{erl_opts, [
]}.

{edoc_opts, [{preprocess, true}]}.
{project_plugins, [rebar3_ex_doc]}.

{deps, []}.

Expand All @@ -24,6 +24,16 @@
]}
]}
]}.

{edoc_opts, [
{preprocess, true}, {stylesheet, "style.css"}
{preprocess, true},
{stylesheet, "style.css"}
]}.

{hex, [{doc, ex_doc}]}.

{ex_doc, [
{source_url, <<"https://github.com/mworrell/filezcache">>},
{extras, [ <<"README.md">>, <<"LICENSE">>, <<"LICENSE-MIT">> ]},
{main, <<"readme">>}
]}.
1 change: 1 addition & 0 deletions test/filezcache_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ cache_stream_test(_Config) ->
{error, eof} = file:read(IO, 1),
true = erlang:is_process_alive(IO),
ok = file:close(IO),
timer:sleep(100),
false = erlang:is_process_alive(IO),
false = erlang:is_process_alive(WriterPid),
% Now the entry should be available as a file
Expand Down

0 comments on commit 4fbee1a

Please sign in to comment.