Skip to content

Commit

Permalink
Update lib/outdoor/release.ex
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Jul 8, 2023
1 parent e547035 commit 25f718c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/outdoor/release.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
defmodule Outdoor.Release do
@moduledoc """
@moduledoc '''
Used for executing DB release tasks when run in production without Mix
installed.
"""
'''
@app :outdoor

def migrate do
Expand All @@ -18,11 +18,20 @@ defmodule Outdoor.Release do
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :down, to: version))
end

def generate_tag do
{message, 0} = System.cmd("git", ["log", "-1", "--pretty=%B"])
System.cmd("git", ["tag", String.trim(message)])
end

def push_tags do
System.cmd("git", ["push", "--tags"])
end

defp repos do
Application.fetch_env!(@app, :ecto_repos)
end

defp load_app do
Application.load(@app)
end
end
end

0 comments on commit 25f718c

Please sign in to comment.