This is useful for the CI builds because they have a detached HEAD or
for emulating a feature that is availible only on a particular branch
(e.g pleroma_ctl downloads CI artifacts only for develop and master)
script: &release
- mix deps.get --only prod
- mkdir release
+ - PLEROMA_BUILD_BRANCH=$CI_COMMIT_REF_NAME
- mix release --path release
branch_name =
with {branch_name, 0} <- System.cmd("git", ["rev-parse", "--abbrev-ref", "HEAD"]),
+ branch_name <- System.get_env("PLEROMA_BUILD_BRANCH") || branch_name,
true <- branch_name != "master" do
branch_name =
String.trim(branch_name)