Packages

An architecture in a box for a back-end webserver.

Current section

Files

Jump to
mithril template $PROJECT_NAME$ bin reset
Raw

template/$PROJECT_NAME$/bin/reset

#!/usr/bin/env bash
#
# Reset Script
#
# Resets a development environment by deleting all build artifacts, dropping
# any databases, and rerunning `bin/setup`.
# Clear the _build directory
rm -rf _build/
# Clear the deps
rm -rf deps/
<%= if assigns[:ecto] do %>
# Drop the database
cd apps/<%= @project_name %>/ && {
mix ecto.drop
cd -;
}
<% end %>
# Rerun bin/setup
bin/setup || { exit 1; }