Skip to content

Commit

Permalink
Add compile requirement to mix task
Browse files Browse the repository at this point in the history
  • Loading branch information
brunvez committed May 9, 2022
1 parent 9966652 commit d481b64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
### New features

### Bug fixes
- Fix `mix scapa.gen.versions` not running due to compilation not being required.

## 0.1.0 (2022-05-09)

### New features

- Run `mix scapa.gen.versions` to setup the project, adding doc versions to all @doc tags.
- Use `.scapa.exs` to config the mix tasks,
- Use `.scapa.exs` to config the mix tasks.
5 changes: 3 additions & 2 deletions lib/mix/tasks/scapa.gen.versions.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ defmodule Mix.Tasks.Scapa.Gen.Versions do

use Mix.Task

@requirements ["compile"]

alias Scapa.Config

@doc false
@impl Mix.Task
def run(_argv) do
config = Config.fetch_config()

for {path, content} <- Scapa.CLI.generate_versions(config),
do: File.write(path, content)
for {path, content} <- Scapa.CLI.generate_versions(config), do: File.write(path, content)
end
end

0 comments on commit d481b64

Please sign in to comment.