From 7665cdd4fda28a0cddf1ce349bf674328f63d4ed Mon Sep 17 00:00:00 2001 From: Jules Sagot--Gentil Date: Sat, 25 Feb 2023 17:04:09 +0100 Subject: [PATCH] feat: add release target to Makefile I used the Gitlab CI of Framasoft to get the release code. See https://framagit.org/framasoft/mobilizon/-/blob/5a30bc2f15c82779e4941fb993689c4c8dd56679/.gitlab-ci.yml#L280 --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 1542c6179..a1b3c5b09 100644 --- a/Makefile +++ b/Makefile @@ -25,3 +25,14 @@ format: docker-compose run --rm api bash -c "mix format && mix credo --strict" @bash docker/message.sh "Code is now ready to commit :)" 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