Merge remote-tracking branch 'origin/v3-dev-main' into v3-porting

This commit is contained in:
Dan Buch 2022-10-02 20:16:11 -04:00
commit d34a232baf
Signed by: meatballhat
GPG Key ID: A12F782281063434
22 changed files with 30 additions and 26 deletions

View File

@ -92,7 +92,7 @@ jobs:
chmod +x "${GITHUB_WORKSPACE}/.local/bin/gfmrun" chmod +x "${GITHUB_WORKSPACE}/.local/bin/gfmrun"
- name: gfmrun - name: gfmrun
run: go run internal/build/build.go gfmrun --walk docs/v2/ run: go run internal/build/build.go gfmrun --walk docs/v3/
- name: diff check - name: diff check
run: | run: |
@ -100,7 +100,10 @@ jobs:
git diff --cached --exit-code git diff --cached --exit-code
publish: publish:
if: startswith(github.ref, 'refs/tags/') # TODO: switch once v3 is released {{
# if: startswith(github.ref, 'refs/tags/')
if: 'false'
# }}
name: publish name: publish
needs: [test-docs] needs: [test-docs]
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -1,6 +1,6 @@
# cli # cli
[![GoDoc](https://godoc.org/github.com/urfave/cli?status.svg)](https://pkg.go.dev/github.com/urfave/cli/v2) [![GoDoc](https://godoc.org/github.com/urfave/cli?status.svg)](https://pkg.go.dev/github.com/urfave/cli/v3)
[![codebeat](https://codebeat.co/badges/0a8f30aa-f975-404b-b878-5fab3ae1cc5f)](https://codebeat.co/projects/github-com-urfave-cli) [![codebeat](https://codebeat.co/badges/0a8f30aa-f975-404b-b878-5fab3ae1cc5f)](https://codebeat.co/projects/github-com-urfave-cli)
[![Go Report Card](https://goreportcard.com/badge/urfave/cli)](https://goreportcard.com/report/urfave/cli) [![Go Report Card](https://goreportcard.com/badge/urfave/cli)](https://goreportcard.com/report/urfave/cli)
[![codecov](https://codecov.io/gh/urfave/cli/branch/main/graph/badge.svg)](https://codecov.io/gh/urfave/cli) [![codecov](https://codecov.io/gh/urfave/cli/branch/main/graph/badge.svg)](https://codecov.io/gh/urfave/cli)

View File

@ -6,7 +6,7 @@ import (
"strconv" "strconv"
"syscall" "syscall"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
// FlagInputSourceExtension is an extension interface of cli.Flag that // FlagInputSourceExtension is an extension interface of cli.Flag that

View File

@ -5,7 +5,7 @@ package altsrc
import ( import (
"flag" "flag"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
// BoolFlag is the flag type that wraps cli.BoolFlag to allow // BoolFlag is the flag type that wraps cli.BoolFlag to allow

View File

@ -10,7 +10,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
type testApplyInputSource struct { type testApplyInputSource struct {

View File

@ -3,7 +3,7 @@ package altsrc
import ( import (
"time" "time"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
// InputSourceContext is an interface used to allow // InputSourceContext is an interface used to allow

View File

@ -6,7 +6,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
const ( const (

View File

@ -8,7 +8,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
// NewJSONSourceFromFlagFunc returns a func that takes a cli.Context // NewJSONSourceFromFlagFunc returns a func that takes a cli.Context

View File

@ -6,7 +6,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
// MapInputSource implements InputSourceContext to return // MapInputSource implements InputSourceContext to return

View File

@ -6,7 +6,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
func TestCommandTomFileTest(t *testing.T) { func TestCommandTomFileTest(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"reflect" "reflect"
"github.com/BurntSushi/toml" "github.com/BurntSushi/toml"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
type tomlMap struct { type tomlMap struct {

View File

@ -6,7 +6,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
func TestCommandYamlFileTest(t *testing.T) { func TestCommandYamlFileTest(t *testing.T) {

View File

@ -9,7 +9,7 @@ import (
"runtime" "runtime"
"strings" "strings"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"
) )

View File

@ -6,8 +6,8 @@ import (
"os" "os"
"time" "time"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
"github.com/urfave/cli/v2/altsrc" "github.com/urfave/cli/v3/altsrc"
) )
func ExampleApp_Run_yamlFileLoaderDuration() { func ExampleApp_Run_yamlFileLoaderDuration() {

View File

@ -14,7 +14,7 @@ import (
"syscall" "syscall"
"text/template" "text/template"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
"golang.org/x/text/cases" "golang.org/x/text/cases"
"golang.org/x/text/language" "golang.org/x/text/language"
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"

View File

@ -5,7 +5,7 @@ import (
"reflect" "reflect"
"testing" "testing"
main "github.com/urfave/cli/v2/cmd/urfave-cli-genflags" main "github.com/urfave/cli/v3/cmd/urfave-cli-genflags"
) )
func TestTypeName(t *testing.T) { func TestTypeName(t *testing.T) {

1
docs/v3/index.md Normal file
View File

@ -0,0 +1 @@
# v3 guide

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/urfave/cli/v2 module github.com/urfave/cli/v3
go 1.18 go 1.18

View File

@ -1,4 +1,4 @@
package cli // import "github.com/urfave/cli/v2" package cli // import "github.com/urfave/cli/v3"
Package cli provides a minimal framework for creating and organizing command Package cli provides a minimal framework for creating and organizing command
line Go applications. cli is designed to be easy to understand and write, line Go applications. cli is designed to be easy to understand and write,
@ -1948,7 +1948,7 @@ type VisibleFlagCategory interface {
} }
VisibleFlagCategory is a category containing flags. VisibleFlagCategory is a category containing flags.
package altsrc // import "github.com/urfave/cli/v2/altsrc" package altsrc // import "github.com/urfave/cli/v3/altsrc"
FUNCTIONS FUNCTIONS

View File

@ -13,7 +13,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
const ( const (
@ -139,10 +139,10 @@ func TestActionFunc(c *cli.Context) error {
tags := c.String("tags") tags := c.String("tags")
for _, pkg := range c.StringSlice("packages") { for _, pkg := range c.StringSlice("packages") {
packageName := "github.com/urfave/cli/v2" packageName := "github.com/urfave/cli/v3"
if pkg != "cli" { if pkg != "cli" {
packageName = fmt.Sprintf("github.com/urfave/cli/v2/%s", pkg) packageName = fmt.Sprintf("github.com/urfave/cli/v3/%s", pkg)
} }
if err := runCmd( if err := runCmd(

View File

@ -3,7 +3,7 @@
package main package main
import ( import (
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
func main() { func main() {

View File

@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v3"
) )
func TestFloat64SliceFlag_SatisfiesFlagInterface(t *testing.T) { func TestFloat64SliceFlag_SatisfiesFlagInterface(t *testing.T) {