From f962087445719a88cdf6371fc977ea30acecf615 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Tue, 10 Feb 2026 11:06:43 -0300 Subject: [PATCH] chore(taskfile): avoid compiling when not needed --- .gitignore | 1 + Taskfile.yaml | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 008dcff3153d850de53e4e792fb320355f0009ea..c0bed181bd8e809c3eb461b7b67778272f556911 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ Thumbs.db manpages/ completions/crush.*sh .prettierignore +.task diff --git a/Taskfile.yaml b/Taskfile.yaml index bff27387d6be353ccd02cf6437b4acafb30334c9..6be3d61cc48f23d2c6b7ecc8befc529a53a709a5 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -46,8 +46,11 @@ tasks: LDFLAGS: '{{if .VERSION}}-ldflags="-X github.com/charmbracelet/crush/internal/version.Version={{.VERSION}}"{{end}}' cmds: - "go build {{if .RACE}}-race{{end}} {{.LDFLAGS}} ." + sources: + - ./**/*.go + - go.mod generates: - - crush + - crush{{exeExt}} run: desc: Run build @@ -91,6 +94,9 @@ tasks: cmds: - task: fetch-tags - go install {{.LDFLAGS}} -v . + sources: + - ./**/*.go + - go.mod profile:cpu: desc: 10s CPU profile