Skip to content

Instantly share code, notes, and snippets.

@navinpeiris
navinpeiris / text.exs
Created February 22, 2026 06:48
test.exs config for branch specific db's
git_branch =
case System.cmd("git", ["rev-parse", "--abbrev-ref", "HEAD"]) do
{branch, 0} -> String.trim(branch)
_ -> ""
end
db_suffix =
if git_branch == "main" do
""
else