mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 23:01:42 +00:00
feat: taskfile
This commit is contained in:
parent
b478d91d02
commit
156a801e7d
2 changed files with 20 additions and 9 deletions
9
Makefile
9
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
|
||||
|
|
20
Taskfile.yaml
Normal file
20
Taskfile.yaml
Normal file
|
@ -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"
|
Loading…
Reference in a new issue