~ihabunek/triglav

5a99cdc27265a2189a1d225e58964d30c3fd6562 — Ivan Habunek 3 months ago cec00e1
Revise release procedure
2 files changed, 11 insertions(+), 4 deletions(-)

M Makefile
M mix.exs
M Makefile => Makefile +3 -3
@@ 3,13 3,13 @@
release:
	mix deps.get --only prod
	MIX_ENV=prod mix compile
	npm install --prefix ./assets
	npm run deploy --prefix ./assets
	mix phx.digest
	MIX_ENV=prod mix assets.deploy
	MIX_ENV=prod mix release --overwrite
	mix phx.digest.clean --all

deploy:
	fab -H bezdomni --prompt-for-sudo-password deploy

clean:
	mix phx.digest.clean --all
	rm -rf priv/static/assets

M mix.exs => mix.exs +8 -1
@@ 66,7 66,14 @@ defmodule Triglav.MixProject do
      setup: ["deps.get", "ecto.setup", "cmd npm install --prefix assets"],
      "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
      "ecto.reset": ["ecto.drop", "ecto.setup"],
      test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"]
      test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
      "assets.deploy": [
        "esbuild default --minify",
        "esbuild routes --minify",
        "esbuild track --minify",
        "sass default",
        "phx.digest"
      ]
    ]
  end
end