pulumi/pkg/workspace
Matt Ellis e0918723ae Allow build metadata in semver for plugins
Semver allows you to attach "build metadata" to a version by appending
the version with `+` and then metadata. In #2216 we started to take
advantage of this as the place to put the git commit information,
instead of including it as part of the "version". This is more in line
with what Semver expects to be done, because git commit information
isn't orderable.

Because of this, we started to publish plugins with versions like
`v0.16.5-dev.1542649729+g07d8224`. However, our logic for discovering
plugins in the cache did an initial filtering based on folder names in
the cache and the regex did not allow a + in the "version" field.

This meant that from the point of view of the cache, the plugin was
not present. This would lead to very confusing behavior where
something like `pulumi plugin install resource azure
v0.16.5-dev.1542649729+g07d8224` would download the plugin, but
`pulumi plugin ls` would not see it and attempting to do an update
with it would fail with an error saying the plugin was not installed.

This change relaxes the regular expression to allow it to match these
sorts of paths. We still use the `semver` library to ensure that the
version we've extracted from the directory name is a valid semver.
2018-11-21 17:10:43 -08:00
..
creds.go Add license headers 2018-05-22 15:02:47 -07:00
paths.go Tidy up some data structures (#2135) 2018-11-01 08:28:11 -07:00
plugins.go Allow build metadata in semver for plugins 2018-11-21 17:10:43 -08:00
project.go Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00
project_test.go Allow more types for runtimeOptions 2018-08-06 14:00:58 -07:00
settings.go Tidy up some data structures (#2135) 2018-11-01 08:28:11 -07:00
templates.go Move away from ${PROJECT} and ${DESCRIPTION} (#1873) 2018-09-05 08:00:57 -07:00
templates_test.go Add license headers 2018-05-22 15:02:47 -07:00
workspace.go Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00