1
0
mirror of https://github.com/go-task/task.git synced 2025-05-31 23:19:42 +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" "path/filepath"
"syscall" "syscall"
"github.com/go-task/task/v2" "github.com/go-task/task/v3"
"github.com/go-task/task/v2/internal/args" "github.com/go-task/task/v3/internal/args"
"github.com/go-task/task/v2/internal/logger" "github.com/go-task/task/v3/internal/logger"
"github.com/spf13/pflag" "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 ( require (
github.com/fatih/color v1.7.0 github.com/fatih/color v1.7.0

View File

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

View File

@ -3,7 +3,7 @@ package args
import ( import (
"strings" "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 // Parse parses command line argument: tasks and vars of each task

View File

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

View File

@ -1,7 +1,7 @@
package compiler package compiler
import ( 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. // Compiler handles compilation of a task before its execution.

View File

@ -4,7 +4,7 @@ import (
"os" "os"
"strings" "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 // GetEnviron the all return all environment variables encapsulated on a

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,7 +5,7 @@ import (
"strings" "strings"
"text/template" "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 // Templater is a help struct that allow us to call "replaceX" funcs multiple

View File

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

View File

@ -4,10 +4,10 @@ import (
"context" "context"
"fmt" "fmt"
"github.com/go-task/task/v2/internal/execext" "github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v2/internal/logger" "github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v2/internal/status" "github.com/go-task/task/v3/internal/status"
"github.com/go-task/task/v2/internal/taskfile" "github.com/go-task/task/v3/internal/taskfile"
) )
// Status returns an error if any the of given tasks is not up-to-date // 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"
"sync/atomic" "sync/atomic"
"github.com/go-task/task/v2/internal/compiler" "github.com/go-task/task/v3/internal/compiler"
compilerv2 "github.com/go-task/task/v2/internal/compiler/v2" compilerv2 "github.com/go-task/task/v3/internal/compiler/v2"
compilerv3 "github.com/go-task/task/v2/internal/compiler/v3" compilerv3 "github.com/go-task/task/v3/internal/compiler/v3"
"github.com/go-task/task/v2/internal/execext" "github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v2/internal/logger" "github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v2/internal/output" "github.com/go-task/task/v3/internal/output"
"github.com/go-task/task/v2/internal/summary" "github.com/go-task/task/v3/internal/summary"
"github.com/go-task/task/v2/internal/taskfile" "github.com/go-task/task/v3/internal/taskfile"
"github.com/go-task/task/v2/internal/taskfile/read" "github.com/go-task/task/v3/internal/taskfile/read"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
) )

View File

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

View File

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

View File

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