on main help sign in
chore(taskfile): avoid compiling when not needed
f962087Andrey Nering
.gitignore+1
@@ -50,3 +50,4 @@ Thumbs.db
50manpages/
50manpages/
51completions/crush.*sh
51completions/crush.*sh
52.prettierignore
52.prettierignore
53+.task
Taskfile.yaml+7−1
@@ -46,8 +46,11 @@ tasks:
46 LDFLAGS: '{{if .VERSION}}-ldflags="-X github.com/charmbracelet/crush/internal/version.Version={{.VERSION}}"{{end}}'
46 LDFLAGS: '{{if .VERSION}}-ldflags="-X github.com/charmbracelet/crush/internal/version.Version={{.VERSION}}"{{end}}'
47 cmds:
47 cmds:
48 - "go build {{if .RACE}}-race{{end}} {{.LDFLAGS}} ."
48 - "go build {{if .RACE}}-race{{end}} {{.LDFLAGS}} ."
49+ sources:
50+ - ./**/*.go
51+ - go.mod
49 generates:
52 generates:
50− - crush
53+ - crush{{exeExt}}
51
54
52 run:
55 run:
53 desc: Run build
56 desc: Run build
@@ -91,6 +94,9 @@ tasks:
91 cmds:
94 cmds:
92 - task: fetch-tags
95 - task: fetch-tags
93 - go install {{.LDFLAGS}} -v .
96 - go install {{.LDFLAGS}} -v .
97+ sources:
98+ - ./**/*.go
99+ - go.mod
94
100
95 profile:cpu:
101 profile:cpu:
96 desc: 10s CPU profile
102 desc: 10s CPU profile