Skip to content

Commit

Permalink
improve windows compatibility for taskfile
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmckendry committed Nov 10, 2024
1 parent aa357f0 commit 86ba2cf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions 2021/taskfile.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
version: 3

vars:
CU: '{{if eq OS "windows"}}coreutils {{end}}'
EXE: '{{if eq OS "windows"}}.exe{{end}}'

tasks:
default:
cmds:
- cmd: cp ./tests/*.odin .
- cmd: "{{.CU}}cp ./tests/*.odin ."
silent: true
- defer: { task: clean }
- cmd: odin test . -vet -strict-style
Expand All @@ -15,7 +19,7 @@ tasks:

clean:
cmds:
- cmd: rm -f *_test.odin
- cmd: "{{.CU}}rm -f *_test.odin"
silent: true
- cmd: rm -f 2021 || true
- cmd: "{{.CU}}rm -f 2021{{.EXE}} || true"
silent: true

0 comments on commit 86ba2cf

Please sign in to comment.