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

improve dev version detection #4732

Merged
merged 3 commits into from
Jun 2, 2020
Merged

improve dev version detection #4732

merged 3 commits into from
Jun 2, 2020

Conversation

jaxxstorm
Copy link
Contributor

Currently the isDevVersion function only tests for "dev" versions.
When installing pulumi from Homebrew with the --HEAD flag we get an
alpha version locally. This can mean the user gets the upgrade prompt
when it's not valid.

This change changes the logic to check against a regex for all the
possible semver pre versions.

It also adds a unit test to ensure we're getting the right result

Currently the `isDevVersion` function only tests for "dev" versions.
When installing pulumi from Homebrew with the `--HEAD` flag we get an
alpha version locally. This can mean the user gets the upgrade prompt
when it's not valid.

This change changes the logic to check against a regex for all the
possible semver `pre` versions.

It also adds a unit test to ensure we're getting the right result
Copy link
Member

@justinvp justinvp left a comment

Choose a reason for hiding this comment

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

LGTM

pkg/cmd/pulumi/pulumi_test.go Outdated Show resolved Hide resolved
pkg/cmd/pulumi/pulumi_test.go Show resolved Hide resolved
jaxxstorm and others added 2 commits May 29, 2020 13:13
Co-authored-by: Justin Van Patten <jvp@justinvp.com>
@stack72 stack72 merged commit bc05e2c into master Jun 2, 2020
@stack72 stack72 deleted the jaxxstorm/fix-dev-version branch June 2, 2020 10:51
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.

None yet

3 participants