From 156a801e7d368ee6be8c72f0e1c35c56dc90290f Mon Sep 17 00:00:00 2001 From: f Date: Mon, 8 Jan 2024 14:17:48 -0300 Subject: [PATCH] feat: taskfile --- Makefile | 9 --------- Taskfile.yaml | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 Taskfile.yaml diff --git a/Makefile b/Makefile index f295a3e0..f29bfa47 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,6 @@ SHELL := /bin/bash .DEFAULT_GOAL := help -# Copiar el archivo de configuraciĆ³n y avisar cuando hay que -# actualizarlo. -.env: .env.example - @test -f $@ || cp -v $< $@ - @test -f $@ && echo "Revisa $@ para actualizarlo con respecto a $<" - @test -f $@ && diff -auN --color $@ $< - -include .env - export # XXX: El espacio antes del comentario cuenta como espacio diff --git a/Taskfile.yaml b/Taskfile.yaml new file mode 100644 index 00000000..8e2b2310 --- /dev/null +++ b/Taskfile.yaml @@ -0,0 +1,20 @@ +--- +version: "3" +vars: + CURRENT_BRANCH: + sh: "git rev-parse --abbrev-ref HEAD" +shopt: +- "globstar" +dotenv: +- ".env" +tasks: + env: + desc: "Install the .env file" + cmds: + - ": Environment vars have changed, please review and edit" + - "cp --no-clobber .env.example .env" + - "diff -auN --color .env.example .env" + sources: + - ".env.example" + generates: + - ".env"