diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-29 00:01:45 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-29 00:01:45 +0300 |
| commit | a42d68e15754ae67d24dd4e76731e937b57e23f9 (patch) | |
| tree | 429d79b400f072d323613f1ba59ef516f1754ccc | |
| parent | ad21f1b972063d2543f402c04a20f32b263e60e1 (diff) | |
convert to magefilev0.1.1
| -rw-r--r-- | Magefile.go | 25 | ||||
| -rw-r--r-- | Taskfile.yaml | 15 | ||||
| -rw-r--r-- | go.mod | 1 | ||||
| -rw-r--r-- | go.sum | 2 |
4 files changed, 28 insertions, 15 deletions
diff --git a/Magefile.go b/Magefile.go new file mode 100644 index 0000000..4320a9e --- /dev/null +++ b/Magefile.go @@ -0,0 +1,25 @@ +//go:build mage + +package main + +import ( + "github.com/magefile/mage/sh" +) + +var Default = Build + +func Build() error { + return sh.RunV("go", "build", "-o", "timr", "./cmd/timr") +} + +func Run() error { + return sh.RunV("go", "run", "./cmd/timr") +} + +func Test() error { + return sh.RunV("go", "test", "./...") +} + +func Install() error { + return sh.RunV("go", "install", "./cmd/timr") +} diff --git a/Taskfile.yaml b/Taskfile.yaml deleted file mode 100644 index 0adfee8..0000000 --- a/Taskfile.yaml +++ /dev/null @@ -1,15 +0,0 @@ -version: '3' - -tasks: - default: - cmds: - - go build -o timr ./cmd/timr - run: - cmds: - - go run ./cmd/timr - test: - cmds: - - go test ./... - install: - cmds: - - go install ./cmd/timr @@ -6,6 +6,7 @@ require ( github.com/charmbracelet/bubbletea v1.3.5 github.com/charmbracelet/lipgloss v1.1.0 github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be + github.com/magefile/mage v1.15.0 ) require ( @@ -18,6 +18,8 @@ github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6 github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg= +github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= |
