summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Magefile.go25
-rw-r--r--Taskfile.yaml15
-rw-r--r--go.mod1
-rw-r--r--go.sum2
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
diff --git a/go.mod b/go.mod
index 1160426..82c8652 100644
--- a/go.mod
+++ b/go.mod
@@ -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 (
diff --git a/go.sum b/go.sum
index 0c5f8b7..6a79bf7 100644
--- a/go.sum
+++ b/go.sum
@@ -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=