Skip to content

Commit

Permalink
Use a more recent Hex version (#101)
Browse files Browse the repository at this point in the history
* Use a more recent Hex version

We need to use one that works with OTP 28

* Act on CI results: do the same fix for `ex_doc` generation
  • Loading branch information
paulo-ferraz-oliveira authored Sep 15, 2024
1 parent 279f3ac commit 525cd6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
uses: actions/checkout@v4
- name: Build ex_doc
run: |
mix archive.install github hexpm/hex --force
mix deps.get
mix escript.build
- name: Save cache for consumption # We do this to use the file in a non-Elixir env.
Expand Down
6 changes: 3 additions & 3 deletions test/rebar3_ex_doc_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ all_post_27(_OTPRelease) ->
init_per_suite(Config) ->
{ok, Cwd} = file:get_cwd(),
ok = file:set_cwd("../../../.."),
{ok, _} = rebar_utils:sh("mix do deps.get, escript.build", [
{ok, _} = rebar_utils:sh("mix do archive.install github hexpm/hex --force, deps.get, escript.build", [
{return_on_error, true}
]),
file:set_cwd(Cwd),
Expand Down Expand Up @@ -297,8 +297,8 @@ mermaid_before_before_closing_body_tag(Config) ->
%% Mermaid CDN followed by init script
MermaidRE = "<script src=\"https://cdn.jsdelivr.net/npm/mermaid@.*/dist/mermaid.min.js\">(?s).*</script>(?s).*<script>(?s).*</script>",
#{html := BeforeCloseBodyTagRE} = proplists:get_value(before_closing_body_tag, DocConfig),
lists:foreach(fun (Doc) ->

lists:foreach(fun (Doc) ->
{match, [{StartMermaid,_}]} = re:run(Doc, MermaidRE, []),
{match, [{StartBeforeCloseBodyTag,_}]} = re:run(Doc, BeforeCloseBodyTagRE, []),
?assert(StartMermaid < StartBeforeCloseBodyTag)
Expand Down

0 comments on commit 525cd6c

Please sign in to comment.