Skip to content

Commit

Permalink
Move DB folder in dev mode to ease release test
Browse files Browse the repository at this point in the history
  • Loading branch information
Neylix authored and samuelmanzanera committed Jan 17, 2023
1 parent d762f35 commit 3507552
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ config :archethic,
"data_#{System.get_env("ARCHETHIC_CRYPTO_SEED", "node1")}"
)

config :archethic, :root_mut_dir, System.get_env("ARCHETHIC_ROOT_MUT_DIR", "./data")

config :telemetry_poller, :default, period: 5_000

# Set a higher stacktrace during development. Avoid configuring such
Expand Down
8 changes: 2 additions & 6 deletions lib/mix/tasks/clean_db.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ defmodule Mix.Tasks.Archethic.CleanDb do
use Mix.Task

def run(_arg) do
"_build/dev/lib/archethic/data*"
|> Path.wildcard()
|> Enum.each(fn path ->
IO.puts("#{path} will be removed")
File.rm_rf!(path)
end)
Application.get_env(:archethic, :root_mut_dir)
|> File.rm_rf!()

IO.puts("Database dropped")
end
Expand Down

0 comments on commit 3507552

Please sign in to comment.