Skip to content

Conversation

@jaer-tsun
Copy link
Contributor

@jaer-tsun jaer-tsun commented Feb 6, 2020

What this PR does / why we need it:
The value of minor was incorrectly assumed to be e.g. 14.8-hotfix.20191113 instead of 14+

Fixes #494

@jaer-tsun jaer-tsun requested a review from matmerr February 6, 2020 18:24
matmerr
matmerr previously approved these changes Feb 6, 2020
@matmerr
Copy link
Member

matmerr commented Feb 6, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jchauncey
Copy link

You should add the test I have in this pr - #497

@jaer-tsun
Copy link
Contributor Author

thanks @jchauncey , I've added it but in a different order, since second version for us will always be 1.11

@jaer-tsun jaer-tsun requested a review from matmerr February 6, 2020 19:20
npm/util/util.go Outdated
return -2
}
v2, err := semver.NewVersion(secondVer.Major+secondVer.Minor)
v2, err := semver.NewVersion(secondVer.Major+"."+secondVer.Minor)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as a utility function, I think you should not assume the caller always give a right format in the secondVer.

@jaer-tsun jaer-tsun merged commit 2378d37 into Azure:master Feb 7, 2020
@jaer-tsun jaer-tsun deleted the npmVerCheck branch February 7, 2020 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NPM doesn't work with Patched Kubernetes

4 participants