Skip to content

Commit 18358dc

Browse files
committed
chore: migrate to magefiles
1 parent 7f2fdca commit 18358dc

File tree

6 files changed

+58
-18
lines changed

6 files changed

+58
-18
lines changed

.github/workflows/test.yml

+19-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,22 @@ jobs:
1818
- name: Check out code into the Go module directory
1919
uses: actions/checkout@v1
2020
- name: Test
21-
run: make ci
21+
run: |
22+
export PATH=${PATH}:`go env GOPATH`/bin
23+
go install github.com/magefile/mage
24+
mage test
25+
go-mod-tidy:
26+
name: "Go mod tidy"
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Install Go
30+
uses: actions/setup-go@v1
31+
with:
32+
go-version: 1.14.x
33+
- name: Check out code into the Go module directory
34+
uses: actions/checkout@v1
35+
- name: Tidy check
36+
run: |
37+
export PATH=${PATH}:`go env GOPATH`/bin
38+
go install github.com/magefile/mage
39+
mage gomodtidy

Makefile

-17
This file was deleted.

go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ module github.com/aevea/git/v2
33
go 1.13
44

55
require (
6+
github.com/aevea/magefiles v0.0.0-20200424121010-0004d5a7a2fe
67
github.com/go-git/go-billy/v5 v5.0.0
78
github.com/go-git/go-git/v5 v5.0.0
9+
github.com/magefile/mage v1.9.0
810
github.com/stretchr/testify v1.5.1
911
golang.org/x/crypto v0.0.0-20200406173513-056763e48d71 // indirect
1012
)

go.sum

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/aevea/magefiles v0.0.0-20200424121010-0004d5a7a2fe h1:vQ3Ixsc+ONvCRhhRssVwY5/CnlLAhEkpG9F4TWLrC0k=
2+
github.com/aevea/magefiles v0.0.0-20200424121010-0004d5a7a2fe/go.mod h1:ItpR2y3OMV2cqY57fZv61b0EgZTauhyt5UkC3tq8eqc=
13
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
24
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
35
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
@@ -37,6 +39,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
3739
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
3840
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
3941
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
42+
github.com/magefile/mage v1.9.0 h1:t3AU2wNwehMCW97vuqQLtw6puppWXHO+O2MHo5a50XE=
43+
github.com/magefile/mage v1.9.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
4044
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
4145
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
4246
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=

mage.go

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//+build mage
2+
3+
package main
4+
5+
import (
6+
"github.com/aevea/magefiles"
7+
"github.com/magefile/mage/sh"
8+
)
9+
10+
func Test() error {
11+
err := sh.RunV("sh", "./testdata/setup_test_repos.sh")
12+
13+
if err != nil {
14+
return err
15+
}
16+
17+
return magefiles.Test()
18+
}
19+
20+
func GoModTidy() error {
21+
return magefiles.GoModTidy()
22+
}

tools.go

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// +build tools
2+
3+
package tools
4+
5+
import (
6+
_ "github.com/magefile/mage"
7+
)
8+
9+
func main() {
10+
11+
}

0 commit comments

Comments
 (0)