1
0
mirror of https://github.com/go-task/task.git synced 2025-01-20 04:59:37 +02:00

github.com/go-task/task/v2 -> github.com/go-task/task/v3

This commit is contained in:
Andrey Nering 2020-08-16 15:48:19 -03:00
parent 49bf395f61
commit fb72b46a3c
24 changed files with 67 additions and 67 deletions

View File

@ -9,9 +9,9 @@ import (
"path/filepath"
"syscall"
"github.com/go-task/task/v2"
"github.com/go-task/task/v2/internal/args"
"github.com/go-task/task/v2/internal/logger"
"github.com/go-task/task/v3"
"github.com/go-task/task/v3/internal/args"
"github.com/go-task/task/v3/internal/logger"
"github.com/spf13/pflag"
)

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/go-task/task/v2
module github.com/go-task/task/v3
require (
github.com/fatih/color v1.7.0

View File

@ -5,8 +5,8 @@ import (
"sort"
"text/tabwriter"
"github.com/go-task/task/v2/internal/logger"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/taskfile"
)
// PrintTasksHelp prints help os tasks that have a description

View File

@ -3,7 +3,7 @@ package args
import (
"strings"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/taskfile"
)
// Parse parses command line argument: tasks and vars of each task

View File

@ -4,8 +4,8 @@ import (
"fmt"
"testing"
"github.com/go-task/task/v2/internal/args"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/args"
"github.com/go-task/task/v3/internal/taskfile"
"github.com/stretchr/testify/assert"
)

View File

@ -1,7 +1,7 @@
package compiler
import (
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/taskfile"
)
// Compiler handles compilation of a task before its execution.

View File

@ -4,7 +4,7 @@ import (
"os"
"strings"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/taskfile"
)
// GetEnviron the all return all environment variables encapsulated on a

View File

@ -7,11 +7,11 @@ import (
"strings"
"sync"
"github.com/go-task/task/v2/internal/compiler"
"github.com/go-task/task/v2/internal/execext"
"github.com/go-task/task/v2/internal/logger"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v2/internal/templater"
"github.com/go-task/task/v3/internal/compiler"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/taskfile"
"github.com/go-task/task/v3/internal/templater"
)
var _ compiler.Compiler = &CompilerV2{}

View File

@ -7,11 +7,11 @@ import (
"strings"
"sync"
"github.com/go-task/task/v2/internal/compiler"
"github.com/go-task/task/v2/internal/execext"
"github.com/go-task/task/v2/internal/logger"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v2/internal/templater"
"github.com/go-task/task/v3/internal/compiler"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/taskfile"
"github.com/go-task/task/v3/internal/templater"
)
var _ compiler.Compiler = &CompilerV3{}

View File

@ -6,7 +6,7 @@ import (
"io"
"testing"
"github.com/go-task/task/v2/internal/output"
"github.com/go-task/task/v3/internal/output"
"github.com/stretchr/testify/assert"
)

View File

@ -5,7 +5,7 @@ import (
"path/filepath"
"sort"
"github.com/go-task/task/v2/internal/execext"
"github.com/go-task/task/v3/internal/execext"
"github.com/mattn/go-zglob"
)

View File

@ -3,8 +3,8 @@ package summary
import (
"strings"
"github.com/go-task/task/v2/internal/logger"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/taskfile"
)
func PrintTasks(l *logger.Logger, t *taskfile.Taskfile, c []taskfile.Call) {

View File

@ -5,9 +5,9 @@ import (
"strings"
"testing"
"github.com/go-task/task/v2/internal/logger"
"github.com/go-task/task/v2/internal/summary"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/summary"
"github.com/go-task/task/v3/internal/taskfile"
"github.com/stretchr/testify/assert"
)

View File

@ -3,7 +3,7 @@ package taskfile_test
import (
"testing"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/taskfile"
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v3"

View File

@ -7,8 +7,8 @@ import (
"path/filepath"
"runtime"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v2/internal/templater"
"github.com/go-task/task/v3/internal/taskfile"
"github.com/go-task/task/v3/internal/templater"
"github.com/joho/godotenv"
"gopkg.in/yaml.v3"

View File

@ -6,7 +6,7 @@ import (
"path/filepath"
"runtime"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/taskfile"
"gopkg.in/yaml.v3"
)

View File

@ -3,7 +3,7 @@ package taskfile_test
import (
"testing"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/taskfile"
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v3"

View File

@ -5,7 +5,7 @@ import (
"strings"
"text/template"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/taskfile"
)
// Templater is a help struct that allow us to call "replaceX" funcs multiple

View File

@ -4,9 +4,9 @@ import (
"context"
"errors"
"github.com/go-task/task/v2/internal/execext"
"github.com/go-task/task/v2/internal/logger"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/taskfile"
)
var (

View File

@ -4,10 +4,10 @@ import (
"context"
"fmt"
"github.com/go-task/task/v2/internal/execext"
"github.com/go-task/task/v2/internal/logger"
"github.com/go-task/task/v2/internal/status"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/status"
"github.com/go-task/task/v3/internal/taskfile"
)
// Status returns an error if any the of given tasks is not up-to-date

18
task.go
View File

@ -9,15 +9,15 @@ import (
"sync"
"sync/atomic"
"github.com/go-task/task/v2/internal/compiler"
compilerv2 "github.com/go-task/task/v2/internal/compiler/v2"
compilerv3 "github.com/go-task/task/v2/internal/compiler/v3"
"github.com/go-task/task/v2/internal/execext"
"github.com/go-task/task/v2/internal/logger"
"github.com/go-task/task/v2/internal/output"
"github.com/go-task/task/v2/internal/summary"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v2/internal/taskfile/read"
"github.com/go-task/task/v3/internal/compiler"
compilerv2 "github.com/go-task/task/v3/internal/compiler/v2"
compilerv3 "github.com/go-task/task/v3/internal/compiler/v3"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/output"
"github.com/go-task/task/v3/internal/summary"
"github.com/go-task/task/v3/internal/taskfile"
"github.com/go-task/task/v3/internal/taskfile/read"
"golang.org/x/sync/errgroup"
)

View File

@ -11,8 +11,8 @@ import (
"strings"
"testing"
"github.com/go-task/task/v2"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3"
"github.com/go-task/task/v3/internal/taskfile"
"github.com/stretchr/testify/assert"
)
@ -823,7 +823,7 @@ func TestDotenvShouldIncludeAllEnvFiles(t *testing.T) {
Target: "default",
TrimSpace: false,
Files: map[string]string{
"include.txt": "INCLUDE1='from_include1' INCLUDE2='from_include2'\n",
"include.txt": "INCLUDE1='from_include1' INCLUDE2='from_include2'\n",
},
}
tt.Run(t)
@ -835,11 +835,11 @@ func TestDotenvShouldErrorWithIncludeEnvPath(t *testing.T) {
var buff bytes.Buffer
e := task.Executor{
Dir: dir,
Dir: dir,
Entrypoint: entry,
Summary: true,
Stdout: &buff,
Stderr: &buff,
Summary: true,
Stdout: &buff,
Stderr: &buff,
}
err := e.Setup()
assert.Error(t, err)
@ -852,11 +852,11 @@ func TestDotenvShouldErrorWhenIncludingDependantDotenvs(t *testing.T) {
var buff bytes.Buffer
e := task.Executor{
Dir: dir,
Dir: dir,
Entrypoint: entry,
Summary: true,
Stdout: &buff,
Stderr: &buff,
Summary: true,
Stdout: &buff,
Stderr: &buff,
}
err := e.Setup()

View File

@ -4,10 +4,10 @@ import (
"path/filepath"
"strings"
"github.com/go-task/task/v2/internal/execext"
"github.com/go-task/task/v2/internal/status"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v2/internal/templater"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/status"
"github.com/go-task/task/v3/internal/taskfile"
"github.com/go-task/task/v3/internal/templater"
)
// CompiledTask returns a copy of a task, but replacing variables in almost all

View File

@ -8,8 +8,8 @@ import (
"syscall"
"time"
"github.com/go-task/task/v2/internal/logger"
"github.com/go-task/task/v2/internal/taskfile"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/taskfile"
"github.com/mattn/go-zglob"
"github.com/radovskyb/watcher"
)