bingo
bingo copied to clipboard
-upatch and -u options does not work as expected; bring them back
We had to skip test even:
{
name: "Use -u=patch to upgrade thanos package",
do: func(t *testing.T, g *goEnv, p *testProject) {
if !goVersion.LessThan(version.Go116) {
// TODO(bwplotka): Fix. It's not critical feature though to block release.
t.Skip("From Go 1.16 behavior changed: get: can't query version \"patch\" of module github.com/thanos-io/thanos/cmd/thanos: no existing version is required")
}
fmt.Println(g.ExecOutput(t, p.root, bingoPath, "get", "--upatch", "thanos"))
},
expectRows: []row{
// TODO(bwplotka) This will be painful to maintain, but well... improve it
{name: "thanos", binName: "thanos-v0.21.1", pkgVersion: "github.com/thanos-io/thanos/cmd/[email protected]"},
},
expectBinaries: []string{"thanos-v0.21.1"},
},
Next steps:
- Potentially remove u and upatch options with something home-made that tries to get literally latest commit/tag of provided repo.
Removing -u test too for now as it's misleading most of the time.
{
name: "Use -u to upgrade thanos package",
do: func(t *testing.T, g *goEnv, p *testProject) {
fmt.Println(g.ExecOutput(t, p.root, bingoPath, "get", "-u", "thanos"))
},
expectRows: []row{
// TODO(bwplotka) This will be painful to maintain, but well... improve it
{name: "thanos", binName: "thanos-v0.21.1", pkgVersion: "github.com/thanos-io/thanos/cmd/[email protected]"},
},
expectBinaries: []string{"thanos-v0.21.1"},
},