Skip to content

Commit

Permalink
build(task): replace Make with Task
Browse files Browse the repository at this point in the history
The dot-env functionality in Task is useful here.
Task will also work the same across platforms.
(Our `Makefile` relies on GNU Make features.)
  • Loading branch information
dbohdan committed Dec 3, 2024
1 parent d0c0796 commit 5b6dfe0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/attic/
.env
*.swp
/.task/
*.txt
13 changes: 0 additions & 13 deletions Makefile

This file was deleted.

29 changes: 29 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '3'

dotenv:
- .env

vars:
data_files: '{{.ROOT_DIR}}/data/*'

tasks:
default:
deps:
- fmt
- readme

fmt:
desc: Format `render-template.go`
cmds:
- go fmt render-template.go

readme:
desc: Generate `README.md` using `render-template.go`
sources:
- README.template.md
- render-template.go
- '{{.data_files}}'
generates:
- README.md
cmds:
- go run render-template.go > README.md

0 comments on commit 5b6dfe0

Please sign in to comment.