Skip to content

Commit

Permalink
add a magefile
Browse files Browse the repository at this point in the history
  • Loading branch information
David Bariod committed Aug 7, 2023
1 parent d1f81f4 commit c0e1380
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ require (
github.com/cznic/ql v1.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/magefile/mage v1.15.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g=
github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ=
github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
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-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg=
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
Expand Down
11 changes: 11 additions & 0 deletions mage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//go:build ignore

package main

import (
"os"

"github.com/magefile/mage/mage"
)

func main() { os.Exit(mage.Main()) }
19 changes: 19 additions & 0 deletions magefile.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//go:build mage

package main

import (
"github.com/magefile/mage/sh"
)

func Build() error {
return sh.Run("go", "build", "./")
}

func Test() error {
return sh.Run("go", "test", "./...")
}

func Bench() error {
return sh.Run("go", "test", "-bench", ".", "-run", "^$", "./...")
}

0 comments on commit c0e1380

Please sign in to comment.