chore: align Makefile with padelnomics (pinned tailwind version, help target, dev target, .PHONY)
This commit is contained in:
33
Makefile
33
Makefile
@@ -1,8 +1,31 @@
|
|||||||
|
TAILWIND_VERSION := v4.1.18
|
||||||
TAILWIND := web/bin/tailwindcss
|
TAILWIND := web/bin/tailwindcss
|
||||||
|
SOPS_DOTENV := sops --input-type dotenv --output-type dotenv
|
||||||
|
|
||||||
|
.PHONY: help dev css-build css-watch \
|
||||||
|
secrets-decrypt-dev secrets-decrypt-prod \
|
||||||
|
secrets-edit-dev secrets-edit-prod
|
||||||
|
|
||||||
|
help:
|
||||||
|
@echo "Available targets:"
|
||||||
|
@echo " dev Start full dev environment (migrate, seed, app + worker + CSS watcher)"
|
||||||
|
@echo " css-build Build + minify Tailwind CSS"
|
||||||
|
@echo " css-watch Watch + rebuild Tailwind CSS"
|
||||||
|
@echo " secrets-decrypt-dev Decrypt .env.dev.sops → .env"
|
||||||
|
@echo " secrets-decrypt-prod Decrypt .env.prod.sops → .env"
|
||||||
|
@echo " secrets-edit-dev Edit .env.dev.sops in \$$EDITOR"
|
||||||
|
@echo " secrets-edit-prod Edit .env.prod.sops in \$$EDITOR"
|
||||||
|
|
||||||
|
# ── Dev environment ───────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
dev:
|
||||||
|
@./web/scripts/dev_run.sh
|
||||||
|
|
||||||
|
# ── CSS ───────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
web/bin/tailwindcss:
|
web/bin/tailwindcss:
|
||||||
@mkdir -p web/bin
|
@mkdir -p web/bin
|
||||||
curl -sLo web/bin/tailwindcss https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64
|
curl -sLo web/bin/tailwindcss https://github.com/tailwindlabs/tailwindcss/releases/download/$(TAILWIND_VERSION)/tailwindcss-linux-x64
|
||||||
chmod +x web/bin/tailwindcss
|
chmod +x web/bin/tailwindcss
|
||||||
|
|
||||||
css-build: web/bin/tailwindcss
|
css-build: web/bin/tailwindcss
|
||||||
@@ -11,22 +34,20 @@ css-build: web/bin/tailwindcss
|
|||||||
css-watch: web/bin/tailwindcss
|
css-watch: web/bin/tailwindcss
|
||||||
$(TAILWIND) -i web/src/beanflows/static/css/input.css -o web/src/beanflows/static/css/output.css --watch
|
$(TAILWIND) -i web/src/beanflows/static/css/input.css -o web/src/beanflows/static/css/output.css --watch
|
||||||
|
|
||||||
# -- Secrets (SOPS + age) --
|
# ── Secrets (SOPS + age) ─────────────────────────────────────────────────────
|
||||||
# .env.*.sops files use dotenv format but sops can't infer from the extension,
|
# .env.*.sops files use dotenv format but sops can't infer from the extension,
|
||||||
# so we pass --input-type / --output-type explicitly.
|
# so we pass --input-type / --output-type explicitly.
|
||||||
|
|
||||||
SOPS_DOTENV := sops --input-type dotenv --output-type dotenv
|
|
||||||
|
|
||||||
secrets-decrypt-dev:
|
secrets-decrypt-dev:
|
||||||
$(SOPS_DOTENV) --decrypt .env.dev.sops > .env
|
$(SOPS_DOTENV) --decrypt .env.dev.sops > .env
|
||||||
|
@echo "Decrypted .env.dev.sops → .env"
|
||||||
|
|
||||||
secrets-decrypt-prod:
|
secrets-decrypt-prod:
|
||||||
$(SOPS_DOTENV) --decrypt .env.prod.sops > .env
|
$(SOPS_DOTENV) --decrypt .env.prod.sops > .env
|
||||||
|
@echo "Decrypted .env.prod.sops → .env"
|
||||||
|
|
||||||
secrets-edit-dev:
|
secrets-edit-dev:
|
||||||
$(SOPS_DOTENV) .env.dev.sops
|
$(SOPS_DOTENV) .env.dev.sops
|
||||||
|
|
||||||
secrets-edit-prod:
|
secrets-edit-prod:
|
||||||
$(SOPS_DOTENV) .env.prod.sops
|
$(SOPS_DOTENV) .env.prod.sops
|
||||||
|
|
||||||
.PHONY: css-build css-watch secrets-decrypt-dev secrets-decrypt-prod secrets-edit-dev secrets-edit-prod
|
|
||||||
|
|||||||
Reference in New Issue
Block a user