1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-22 20:20:59 +08:00

TUN-5675: Remove github.com/dgrijalva/jwt-go dependency by upgrading coredns version

This commit is contained in:
cthuang
2022-01-25 13:15:24 +00:00
parent a84cbcde7e
commit 8a5343d0a5
530 changed files with 33042 additions and 14229 deletions

View File

@@ -37,6 +37,7 @@ func BuildBootstrapCommand() *Command {
},
Command: func(args []string, additionalArgs []string) {
generateBootstrap(agouti, noDot, internal, customBootstrapFile)
emitRCAdvertisement()
},
}
}

View File

@@ -36,6 +36,7 @@ func BuildGenerateCommand() *Command {
},
Command: func(args []string, additionalArgs []string) {
generateSpec(args, agouti, noDot, internal, customTestFile)
emitRCAdvertisement()
},
}
}

View File

@@ -20,6 +20,7 @@ func BuildHelpCommand() *Command {
func printHelp(args []string, additionalArgs []string) {
if len(args) == 0 {
usage()
emitRCAdvertisement()
} else {
command, found := commandMatching(args[0])
if !found {
@@ -27,5 +28,6 @@ func printHelp(args []string, additionalArgs []string) {
}
usageForCommand(command, true)
emitRCAdvertisement()
}
}

View File

@@ -131,9 +131,11 @@ import (
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"github.com/onsi/ginkgo/config"
"github.com/onsi/ginkgo/formatter"
"github.com/onsi/ginkgo/ginkgo/testsuite"
)
@@ -243,6 +245,7 @@ func usageForCommand(command *Command, longForm bool) {
func complainAndQuit(complaint string) {
fmt.Fprintf(os.Stderr, "%s\nFor usage instructions:\n\tginkgo help\n", complaint)
emitRCAdvertisement()
os.Exit(1)
}
@@ -306,3 +309,29 @@ func pluralizedWord(singular, plural string, count int) string {
}
return plural
}
func emitRCAdvertisement() {
ackRC := os.Getenv("ACK_GINKGO_RC")
if ackRC != "" {
return
}
home, err := os.UserHomeDir()
if err == nil {
_, err := os.Stat(filepath.Join(home, ".ack-ginkgo-rc"))
if err == nil {
return
}
}
out := formatter.F("\n{{light-yellow}}Ginkgo 2.0 is coming soon!{{/}}\n")
out += formatter.F("{{light-yellow}}=========================={{/}}\n")
out += formatter.F("{{bold}}{{green}}Ginkgo 2.0{{/}} is under active development and will introduce several new features, improvements, and a small handful of breaking changes.\n")
out += formatter.F("A release candidate for 2.0 is now available and 2.0 should GA in Fall 2021. {{bold}}Please give the RC a try and send us feedback!{{/}}\n")
out += formatter.F(" - To learn more, view the migration guide at {{cyan}}{{underline}}https://github.com/onsi/ginkgo/blob/ver2/docs/MIGRATING_TO_V2.md{{/}}\n")
out += formatter.F(" - For instructions on using the Release Candidate visit {{cyan}}{{underline}}https://github.com/onsi/ginkgo/blob/ver2/docs/MIGRATING_TO_V2.md#using-the-beta{{/}}\n")
out += formatter.F(" - To comment, chime in at {{cyan}}{{underline}}https://github.com/onsi/ginkgo/issues/711{{/}}\n\n")
out += formatter.F("To {{bold}}{{coral}}silence this notice{{/}}, set the environment variable: {{bold}}ACK_GINKGO_RC=true{{/}}\n")
out += formatter.F("Alternatively you can: {{bold}}touch $HOME/.ack-ginkgo-rc{{/}}")
fmt.Println(out)
}

View File

@@ -161,6 +161,7 @@ func (r *SpecRunner) RunSpecs(args []string, additionalArgs []string) {
}
} else {
fmt.Printf("Test Suite Failed\n")
emitRCAdvertisement()
os.Exit(1)
}
}

View File

@@ -21,4 +21,5 @@ func BuildVersionCommand() *Command {
func printVersion([]string, []string) {
fmt.Printf("Ginkgo Version %s\n", config.VERSION)
emitRCAdvertisement()
}