feat: add release target to Makefile

I used the Gitlab CI of Framasoft to get the release code. See
5a30bc2f15/.gitlab-ci.yml (L280)
This commit is contained in:
Jules Sagot--Gentil 2023-02-25 17:04:09 +01:00
parent 5a2dfb4098
commit 7665cdd4fd
Signed by: sagotgej
GPG Key ID: C273CA1698E10752

View File

@ -25,3 +25,14 @@ format:
docker-compose run --rm api bash -c "mix format && mix credo --strict" docker-compose run --rm api bash -c "mix format && mix credo --strict"
@bash docker/message.sh "Code is now ready to commit :)" @bash docker/message.sh "Code is now ready to commit :)"
target: init target: init
RELEASE_TAG=$(shell git tag --list '[0-9]*.[0-9]*.[0-9]*' | tail -n1)
release:
mix local.hex --force
mix local.rebar --force
mix deps.get --only-prod
mix compile
mix phx.digest.clean --all && mix phx.digest
mix release --path release/mobilizon
cd release/mobilizon && ln -s lib/mobilizon-*/priv priv
tar czf mobilizon-$(RELEASE_TAG).tar.gz -C release mobilizon