Skip to content

Commit 81f1723

Browse files
authored
Merge pull request #143 from go-task/switch-to-go-modules
Switch to Go modules
2 parents 77f9e3d + 5466622 commit 81f1723

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+4811
-498
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
language: go
22

33
go:
4-
- 1.9.x
54
- 1.10.x
5+
- 1.11.x
66

77
addons:
88
apt:

Gopkg.lock

Lines changed: 0 additions & 188 deletions
This file was deleted.

Gopkg.toml

Lines changed: 0 additions & 36 deletions
This file was deleted.

Taskfile.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@ tasks:
2424
cmds:
2525
- task: go-get
2626
vars: {REPO: golang.org/x/lint/golint}
27-
- task: go-get
28-
vars: {REPO: github.com/golang/dep/cmd/dep}
2927
- task: go-get
3028
vars: {REPO: github.com/goreleaser/goreleaser}
3129
- task: go-get
3230
vars: {REPO: github.com/goreleaser/godownloader}
3331

32+
vendor:
33+
desc: Sync vendor/ directory according to go.mod file
34+
cmds:
35+
- go mod vendor
36+
3437
update-deps:
3538
desc: Updates dependencies
3639
cmds:

cmd/task/task.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"os/signal"
88
"syscall"
99

10-
"github.com/go-task/task"
11-
"github.com/go-task/task/internal/args"
10+
"github.com/go-task/task/v2"
11+
"github.com/go-task/task/v2/internal/args"
1212

1313
"github.com/spf13/pflag"
1414
)

docs/installation.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,35 @@ sudo snap install task
2727

2828
## Go
2929

30-
If you have a [Go][go] environment setup, you can simply run:
30+
Task now uses [Go Modules](https://github.com/golang/go/wiki/Modules), which
31+
means you may have trouble compiling it on older Go versions.
32+
33+
For CI environments we recommend using the [Install Script](#install-script)
34+
instead, which is faster and more stable, since it'll just download the latest
35+
released binary, instead of compiling the edge (master branch) version.
36+
37+
Installing in your `$GOPATH`:
3138

3239
```bash
3340
go get -u -v github.com/go-task/task/cmd/task
3441
```
3542

43+
Installing in another directory:
44+
45+
```bash
46+
git clone https://github.com/go-task/task
47+
cd task
48+
49+
# compiling binary to $GOPATH/bin
50+
go install -v
51+
52+
# compiling it to another location
53+
# use -o ./task.exe on Windows
54+
go build -v -o ./task ./cmd/task
55+
```
56+
57+
Both methods requires having the [Go][go] environment properly setup locally.
58+
3659
## Install script
3760

3861
We also have a [install script][installscript], which is very useful on

go.mod

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module github.com/go-task/task/v2
2+
3+
require (
4+
github.com/Masterminds/semver v1.4.2
5+
github.com/Masterminds/sprig v2.16.0+incompatible
6+
github.com/aokoli/goutils v1.0.1 // indirect
7+
github.com/davecgh/go-spew v1.1.1 // indirect
8+
github.com/google/uuid v1.0.0 // indirect
9+
github.com/huandu/xstrings v1.1.0 // indirect
10+
github.com/imdario/mergo v0.3.6 // indirect
11+
github.com/kr/pretty v0.1.0 // indirect
12+
github.com/mattn/go-zglob v0.0.0-20180803001819-2ea3427bfa53
13+
github.com/mitchellh/go-homedir v1.0.0
14+
github.com/pmezard/go-difflib v1.0.0 // indirect
15+
github.com/radovskyb/watcher v1.0.2
16+
github.com/spf13/pflag v1.0.3
17+
github.com/stretchr/testify v1.2.2
18+
golang.org/x/crypto v0.0.0-20180830192347-182538f80094 // indirect
19+
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d // indirect
20+
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
21+
golang.org/x/sys v0.0.0-20180831094639-fa5fdf94c789 // indirect
22+
gopkg.in/yaml.v2 v2.2.1
23+
mvdan.cc/sh v0.0.0-20180829163519-3a244a89e2e5
24+
)

go.sum

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc=
2+
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
3+
github.com/Masterminds/sprig v2.16.0+incompatible h1:QZbMUPxRQ50EKAq3LFMnxddMu88/EUUG3qmxwtDmPsY=
4+
github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
5+
github.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg=
6+
github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ=
7+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
8+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
9+
github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA=
10+
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
11+
github.com/huandu/xstrings v1.1.0 h1:9oZY6Z/H3A1gytJxzuicbmV5QoR8M1TAPcn9WTg7vqg=
12+
github.com/huandu/xstrings v1.1.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4=
13+
github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28=
14+
github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
15+
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
16+
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
17+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
18+
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
19+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
20+
github.com/mattn/go-zglob v0.0.0-20180803001819-2ea3427bfa53 h1:tGfIHhDghvEnneeRhODvGYOt305TPwingKt6p90F4MU=
21+
github.com/mattn/go-zglob v0.0.0-20180803001819-2ea3427bfa53/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo=
22+
github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0=
23+
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
24+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
25+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
26+
github.com/radovskyb/watcher v1.0.2 h1:9L5TsZUbo1nKhQEQPtICVc+x9UZQ6VPdBepLHyGw/bQ=
27+
github.com/radovskyb/watcher v1.0.2/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg=
28+
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
29+
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
30+
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
31+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
32+
golang.org/x/crypto v0.0.0-20180830192347-182538f80094 h1:rVTAlhYa4+lCfNxmAIEOGQRoD23UqP72M3+rSWVGDTg=
33+
golang.org/x/crypto v0.0.0-20180830192347-182538f80094/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
34+
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d h1:g9qWBGx4puODJTMVyoPrpoxPFgVGd+z1DZwjfRu4d0I=
35+
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
36+
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
37+
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
38+
golang.org/x/sys v0.0.0-20180831094639-fa5fdf94c789 h1:T8D7l6WB3tLu+VpKvw06ieD/OhBi1XpJmG1U/FtttZg=
39+
golang.org/x/sys v0.0.0-20180831094639-fa5fdf94c789/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
40+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
41+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
42+
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
43+
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
44+
mvdan.cc/sh v0.0.0-20180829163519-3a244a89e2e5 h1:FKi9XtQO5aNipfQ/qnnLCoM6gdFwPQY702RRbNRxjK8=
45+
mvdan.cc/sh v0.0.0-20180829163519-3a244a89e2e5/go.mod h1:IeeQbZq+x2SUGBensq/jge5lLQbS3XT2ktyp3wrt4x8=

help.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"sort"
66
"text/tabwriter"
77

8-
"github.com/go-task/task/internal/taskfile"
8+
"github.com/go-task/task/v2/internal/taskfile"
99
)
1010

1111
// PrintTasksHelp prints help os tasks that have a description

internal/args/args.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"errors"
55
"strings"
66

7-
"github.com/go-task/task/internal/taskfile"
7+
"github.com/go-task/task/v2/internal/taskfile"
88
)
99

1010
var (

0 commit comments

Comments
 (0)