Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable survey prompt #4764

Merged
merged 3 commits into from
Sep 11, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions pkg/skaffold/survey/survey.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ import (
"io"
"os"

"github.com/blang/semver"
"github.com/pkg/browser"
"github.com/sirupsen/logrus"

"github.com/GoogleContainerTools/skaffold/pkg/skaffold/color"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/config"
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/version"
)

const (
Prompt = `Help improve Skaffold! Take a 10-second anonymous survey by running
skaffold survey`
Prompt = `Help us make Skaffold better! Take our quick and anonymous survey by running
'skaffold survey'
`
nkubala marked this conversation as resolved.
Show resolved Hide resolved

URL = "https://forms.gle/BMTbGQXLWSdn7vEs6"
)
Expand Down Expand Up @@ -64,16 +64,8 @@ func New(configFile string) *Runner {
}

func (s *Runner) DisplaySurveyPrompt(out io.Writer) error {
// TODO(nkubala): remove after v1.14.0 is released
currentVersion, err := version.ParseVersion(version.Get().Version)
if err == nil {
nextRelease := semver.MustParse("1.14.0")
if currentVersion.LT(nextRelease) {
return nil
}
}
if isStdOut(out) {
fmt.Fprintln(out, Prompt)
color.Green.Fprintf(out, Prompt)
}
return updateConfig(s.configFile)
}
Expand Down