diff --git a/integration/installers/miniconda_versions_test.go b/integration/installers/miniconda_versions_test.go index 682db94..2a1f6d8 100644 --- a/integration/installers/miniconda_versions_test.go +++ b/integration/installers/miniconda_versions_test.go @@ -17,6 +17,7 @@ import ( . "github.com/paketo-buildpacks/occam/matchers" integration_helpers "github.com/paketo-buildpacks/python-installers/integration" + "github.com/paketo-buildpacks/python-installers/pkg/installers/miniconda" ) func minicondaTestVersions(t *testing.T, context spec.G, it spec.S) { @@ -81,7 +82,7 @@ func minicondaTestVersions(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_MINICONDA_VERSION": firstMinicondaVersion}). + WithEnv(map[string]string{miniconda.EnvVersion: firstMinicondaVersion}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), firstLogs.String) @@ -110,7 +111,7 @@ func minicondaTestVersions(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_MINICONDA_VERSION": secondMinicondaVersion}). + WithEnv(map[string]string{miniconda.EnvVersion: secondMinicondaVersion}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), secondLogs.String) diff --git a/integration/installers/pip_layer_reuse_test.go b/integration/installers/pip_layer_reuse_test.go index aafa0c6..055635e 100644 --- a/integration/installers/pip_layer_reuse_test.go +++ b/integration/installers/pip_layer_reuse_test.go @@ -18,6 +18,7 @@ import ( . "github.com/paketo-buildpacks/occam/matchers" integration_helpers "github.com/paketo-buildpacks/python-installers/integration" + "github.com/paketo-buildpacks/python-installers/pkg/installers/pip" ) func pipTestLayerReuse(t *testing.T, context spec.G, it spec.S) { @@ -160,7 +161,7 @@ func pipTestLayerReuse(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_PIP_VERSION": dependencies[0].Version}). + WithEnv(map[string]string{pip.EnvVersion: dependencies[0].Version}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), logs.String) @@ -179,7 +180,7 @@ func pipTestLayerReuse(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_PIP_VERSION": dependencies[1].Version}). + WithEnv(map[string]string{pip.EnvVersion: dependencies[1].Version}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), logs.String) diff --git a/integration/installers/pipenv_layer_reuse_test.go b/integration/installers/pipenv_layer_reuse_test.go index 20cc810..a879436 100644 --- a/integration/installers/pipenv_layer_reuse_test.go +++ b/integration/installers/pipenv_layer_reuse_test.go @@ -19,6 +19,7 @@ import ( . "github.com/paketo-buildpacks/occam/matchers" integration_helpers "github.com/paketo-buildpacks/python-installers/integration" + "github.com/paketo-buildpacks/python-installers/pkg/installers/pipenv" ) func pipenvTestLayerReuse(t *testing.T, context spec.G, it spec.S) { @@ -143,7 +144,7 @@ func pipenvTestLayerReuse(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_PIPENV_VERSION": dependencies[0].Version}). + WithEnv(map[string]string{pipenv.EnvVersion: dependencies[0].Version}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), logs.String) @@ -154,7 +155,7 @@ func pipenvTestLayerReuse(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_PIPENV_VERSION": dependencies[1].Version}). + WithEnv(map[string]string{pipenv.EnvVersion: dependencies[1].Version}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), logs.String) diff --git a/integration/installers/pixi_layer_reuse_test.go b/integration/installers/pixi_layer_reuse_test.go index b58a3da..e94cf9b 100644 --- a/integration/installers/pixi_layer_reuse_test.go +++ b/integration/installers/pixi_layer_reuse_test.go @@ -18,6 +18,7 @@ import ( . "github.com/paketo-buildpacks/occam/matchers" integration_helpers "github.com/paketo-buildpacks/python-installers/integration" + "github.com/paketo-buildpacks/python-installers/pkg/installers/pixi" ) func pixiTestLayerReuse(t *testing.T, context spec.G, it spec.S) { @@ -157,7 +158,7 @@ func pixiTestLayerReuse(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_PIXI_VERSION": dependencies[0].Version}). + WithEnv(map[string]string{pixi.EnvVersion: dependencies[0].Version}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), logs.String) @@ -175,7 +176,7 @@ func pixiTestLayerReuse(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_PIXI_VERSION": dependencies[2].Version}). + WithEnv(map[string]string{pixi.EnvVersion: dependencies[2].Version}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), logs.String) diff --git a/integration/installers/poetry_versions_test.go b/integration/installers/poetry_versions_test.go index e3a4895..5372681 100644 --- a/integration/installers/poetry_versions_test.go +++ b/integration/installers/poetry_versions_test.go @@ -17,6 +17,7 @@ import ( . "github.com/paketo-buildpacks/occam/matchers" integration_helpers "github.com/paketo-buildpacks/python-installers/integration" + "github.com/paketo-buildpacks/python-installers/pkg/installers/poetry" ) func poetryTestVersions(t *testing.T, context spec.G, it spec.S) { @@ -82,7 +83,7 @@ func poetryTestVersions(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_POETRY_VERSION": firstPoetryVersion}). + WithEnv(map[string]string{poetry.EnvVersion: firstPoetryVersion}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), firstLogs.String) @@ -112,7 +113,7 @@ func poetryTestVersions(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_POETRY_VERSION": secondPoetryVersion}). + WithEnv(map[string]string{poetry.EnvVersion: secondPoetryVersion}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), secondLogs.String) diff --git a/integration/installers/uv_layer_reuse_test.go b/integration/installers/uv_layer_reuse_test.go index bebdfff..1f387db 100644 --- a/integration/installers/uv_layer_reuse_test.go +++ b/integration/installers/uv_layer_reuse_test.go @@ -18,6 +18,7 @@ import ( . "github.com/paketo-buildpacks/occam/matchers" integration_helpers "github.com/paketo-buildpacks/python-installers/integration" + "github.com/paketo-buildpacks/python-installers/pkg/installers/uv" ) func uvTestLayerReuse(t *testing.T, context spec.G, it spec.S) { @@ -157,7 +158,7 @@ func uvTestLayerReuse(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_UV_VERSION": dependencies[0].Version}). + WithEnv(map[string]string{uv.EnvVersion: dependencies[0].Version}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), logs.String) @@ -175,7 +176,7 @@ func uvTestLayerReuse(t *testing.T, context spec.G, it spec.S) { settings.Buildpacks.PythonInstallers.Online, settings.Buildpacks.BuildPlan.Online, ). - WithEnv(map[string]string{"BP_UV_VERSION": dependencies[2].Version}). + WithEnv(map[string]string{uv.EnvVersion: dependencies[2].Version}). Execute(name, source) Expect(err).ToNot(HaveOccurred(), logs.String) diff --git a/pkg/installers/miniconda/constants.go b/pkg/installers/miniconda/constants.go index 0b15c27..12c70f2 100644 --- a/pkg/installers/miniconda/constants.go +++ b/pkg/installers/miniconda/constants.go @@ -15,8 +15,10 @@ const ( // DepName is the name of the metadata.dependencies id DepId = "miniconda3" + + EnvVersion = "BP_MINICONDA_VERSION" ) // Priorities is a list of possible places where the buildpack could look for a // specific version of miniconda3 to install, ordered from highest to lowest priority. -var Priorities = []interface{}{"BP_MINICONDA_VERSION"} +var Priorities = []interface{}{EnvVersion} diff --git a/pkg/installers/miniconda/detect.go b/pkg/installers/miniconda/detect.go index 40f85e6..0b7f743 100644 --- a/pkg/installers/miniconda/detect.go +++ b/pkg/installers/miniconda/detect.go @@ -20,12 +20,12 @@ func Detect() packit.DetectFunc { return func(context packit.DetectContext) (packit.DetectResult, error) { var requirements []packit.BuildPlanRequirement - if version, ok := os.LookupEnv("BP_MINICONDA_VERSION"); ok { + if version, ok := os.LookupEnv(EnvVersion); ok { requirements = []packit.BuildPlanRequirement{ { Name: Conda, Metadata: build.BuildPlanMetadata{ - VersionSource: "BP_MINICONDA_VERSION", + VersionSource: EnvVersion, Version: version, }, }, diff --git a/pkg/installers/miniconda/detect_test.go b/pkg/installers/miniconda/detect_test.go index f046d51..c4f4993 100644 --- a/pkg/installers/miniconda/detect_test.go +++ b/pkg/installers/miniconda/detect_test.go @@ -39,7 +39,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { Expect(result).To(Equal(packit.DetectResult{ Plan: packit.BuildPlan{ Provides: []packit.BuildPlanProvision{ - {Name: "conda"}, + {Name: miniconda.Conda}, }, }, })) @@ -48,7 +48,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { context("when BP_MINICONDA_VERSION is set", func() { it.Before(func() { - t.Setenv("BP_MINICONDA_VERSION", "some-version") + t.Setenv(miniconda.EnvVersion, "some-version") }) it("returns a build plan that provides the version of conda from BP_MINICONDA_VERSION", func() { @@ -57,14 +57,14 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { Expect(result.Plan).To(Equal(packit.BuildPlan{ Provides: []packit.BuildPlanProvision{ - {Name: "conda"}, + {Name: miniconda.Conda}, }, Requires: []packit.BuildPlanRequirement{ { Name: "conda", Metadata: build.BuildPlanMetadata{ Version: "some-version", - VersionSource: "BP_MINICONDA_VERSION", + VersionSource: miniconda.EnvVersion, }, }, }, diff --git a/pkg/installers/pip/constants.go b/pkg/installers/pip/constants.go index 70d0aa9..f2327d7 100644 --- a/pkg/installers/pip/constants.go +++ b/pkg/installers/pip/constants.go @@ -4,17 +4,21 @@ package pip -// Pip is the name of the layer into which pip dependency is installed. -const Pip = "pip" +const ( + // Pip is the name of the layer into which pip dependency is installed. + Pip = "pip" -const PipSrc = "pip-source" + PipSrc = "pip-source" -// CPython is the name of the python runtime dependency provided by the CPython buildpack: https://github.com/paketo-buildpacks/cpython -const CPython = "cpython" + // CPython is the name of the python runtime dependency provided by the CPython buildpack: https://github.com/paketo-buildpacks/cpython + CPython = "cpython" -// DependencyChecksumKey is the name of the key in the pip layer TOML whose value is pip dependency's SHA256. -const DependencyChecksumKey = "dependency_checksum" + // DependencyChecksumKey is the name of the key in the pip layer TOML whose value is pip dependency's SHA256. + DependencyChecksumKey = "dependency_checksum" + + EnvVersion = "BP_PIP_VERSION" +) // Priorities is a list of possible places where the buildpack could look for a // specific version of Pip to install, ordered from highest to lowest priority. -var Priorities = []interface{}{"BP_PIP_VERSION"} +var Priorities = []interface{}{EnvVersion} diff --git a/pkg/installers/pip/detect.go b/pkg/installers/pip/detect.go index b92f7c6..2d33ff1 100644 --- a/pkg/installers/pip/detect.go +++ b/pkg/installers/pip/detect.go @@ -15,7 +15,7 @@ import ( // Return a pip requirement func GetVersionedRequirement() *packit.BuildPlanRequirement { - pipVersion := os.Getenv("BP_PIP_VERSION") + pipVersion := os.Getenv(EnvVersion) if pipVersion == "" { return nil } @@ -33,7 +33,7 @@ func GetVersionedRequirement() *packit.BuildPlanRequirement { return &packit.BuildPlanRequirement{ Name: Pip, Metadata: build.BuildPlanMetadata{ - VersionSource: "BP_PIP_VERSION", + VersionSource: EnvVersion, Version: pipVersion, }, } diff --git a/pkg/installers/pip/detect_test.go b/pkg/installers/pip/detect_test.go index 7fbc2fa..5153e21 100644 --- a/pkg/installers/pip/detect_test.go +++ b/pkg/installers/pip/detect_test.go @@ -51,7 +51,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { context("when BP_PIP_VERSION is set", func() { it.Before(func() { - t.Setenv("BP_PIP_VERSION", "some-version") + t.Setenv(pip.EnvVersion, "some-version") }) it("returns a build plan that provides the version of pip from BP_PIP_VERSION", func() { @@ -73,7 +73,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { Name: pip.Pip, Metadata: build.BuildPlanMetadata{ Version: "some-version", - VersionSource: "BP_PIP_VERSION", + VersionSource: pip.EnvVersion, }, }, }, @@ -82,7 +82,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { context("when the provided version is of the form X.Y", func() { it.Before(func() { - t.Setenv("BP_PIP_VERSION", "2.11") + t.Setenv(pip.EnvVersion, "2.11") }) it("selects the version X.Y.0", func() { @@ -105,7 +105,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { Name: pip.Pip, Metadata: build.BuildPlanMetadata{ Version: "2.11.0", - VersionSource: "BP_PIP_VERSION", + VersionSource: pip.EnvVersion, }, }, }, @@ -115,7 +115,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { context("when the provided version is of the form X.Y.Z", func() { it.Before(func() { - t.Setenv("BP_PIP_VERSION", "22.1.3") + t.Setenv(pip.EnvVersion, "22.1.3") }) it("selects the exact provided version X.Y.Z", func() { @@ -138,7 +138,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { Name: pip.Pip, Metadata: build.BuildPlanMetadata{ Version: "22.1.3", - VersionSource: "BP_PIP_VERSION", + VersionSource: pip.EnvVersion, }, }, }, @@ -148,7 +148,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { context("when the provided version is of some other form", func() { it.Before(func() { - t.Setenv("BP_PIP_VERSION", "some.other") + t.Setenv(pip.EnvVersion, "some.other") }) it("selects the exact provided version", func() { @@ -171,7 +171,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { Name: pip.Pip, Metadata: build.BuildPlanMetadata{ Version: "some.other", - VersionSource: "BP_PIP_VERSION", + VersionSource: pip.EnvVersion, }, }, }, diff --git a/pkg/installers/pipenv/constants.go b/pkg/installers/pipenv/constants.go index cccde39..7c472a8 100644 --- a/pkg/installers/pipenv/constants.go +++ b/pkg/installers/pipenv/constants.go @@ -9,6 +9,7 @@ const ( DependencyChecksumKey = "dependency_checksum" CPython = "cpython" Pip = "pip" + EnvVersion = "BP_PIPENV_VERSION" ) -var Priorities = []interface{}{"BP_PIPENV_VERSION"} +var Priorities = []interface{}{EnvVersion} diff --git a/pkg/installers/pipenv/detect.go b/pkg/installers/pipenv/detect.go index 433d4e3..df49296 100644 --- a/pkg/installers/pipenv/detect.go +++ b/pkg/installers/pipenv/detect.go @@ -35,13 +35,13 @@ func Detect() packit.DetectFunc { requirements = append(requirements, pip.GetRequirement()) - pipEnvVersion, ok := os.LookupEnv("BP_PIPENV_VERSION") + pipEnvVersion, ok := os.LookupEnv(EnvVersion) if ok { requirements = append(requirements, packit.BuildPlanRequirement{ Name: Pipenv, Metadata: build.BuildPlanMetadata{ Version: pipEnvVersion, - VersionSource: "BP_PIPENV_VERSION", + VersionSource: EnvVersion, }, }) } diff --git a/pkg/installers/pipenv/detect_test.go b/pkg/installers/pipenv/detect_test.go index 91e84e1..9d7a6ef 100644 --- a/pkg/installers/pipenv/detect_test.go +++ b/pkg/installers/pipenv/detect_test.go @@ -69,7 +69,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { context("when BP_PIPENV_VERSION is set", func() { it.Before(func() { - t.Setenv("BP_PIPENV_VERSION", "1.2.3") + t.Setenv(pipenv.EnvVersion, "1.2.3") }) it("returns a plan that provides a specific pipenv version", func() { @@ -102,7 +102,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { Name: pipenv.Pipenv, Metadata: build.BuildPlanMetadata{ Version: "1.2.3", - VersionSource: "BP_PIPENV_VERSION", + VersionSource: pipenv.EnvVersion, }, }, }, diff --git a/pkg/installers/pixi/constants.go b/pkg/installers/pixi/constants.go index 01a514e..675c2f4 100644 --- a/pkg/installers/pixi/constants.go +++ b/pkg/installers/pixi/constants.go @@ -19,8 +19,10 @@ const ( DepKey = "dependency-sha" PixiArchiveTemplateName = "uv-%s-unknown-linux-musl" + + EnvVersion = "BP_PIXI_VERSION" ) var Priorities = []interface{}{ - "BP_PIXI_VERSION", + EnvVersion, } diff --git a/pkg/installers/pixi/detect.go b/pkg/installers/pixi/detect.go index 46cdaf3..8e2ae92 100644 --- a/pkg/installers/pixi/detect.go +++ b/pkg/installers/pixi/detect.go @@ -43,12 +43,12 @@ func Detect() packit.DetectFunc { }, } - if version, ok := os.LookupEnv("BP_PIXI_VERSION"); ok { + if version, ok := os.LookupEnv(EnvVersion); ok { plan.Requires = []packit.BuildPlanRequirement{ { Name: Pixi, Metadata: build.BuildPlanMetadata{ - VersionSource: "BP_PIXI_VERSION", + VersionSource: EnvVersion, Version: version, }, }, diff --git a/pkg/installers/pixi/detect_test.go b/pkg/installers/pixi/detect_test.go index ffcb594..9f72191 100644 --- a/pkg/installers/pixi/detect_test.go +++ b/pkg/installers/pixi/detect_test.go @@ -61,7 +61,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { context("when the BP_PIXI_VERSION is set", func() { it.Before(func() { - t.Setenv("BP_PIXI_VERSION", "some-version") + t.Setenv(pixi.EnvVersion, "some-version") }) it("returns a plan that requires that version of pixi", func() { @@ -78,7 +78,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { { Name: pixi.Pixi, Metadata: build.BuildPlanMetadata{ - VersionSource: "BP_PIXI_VERSION", + VersionSource: pixi.EnvVersion, Version: "some-version", }, }, diff --git a/pkg/installers/poetry/constants.go b/pkg/installers/poetry/constants.go index c9d79be..2036df2 100644 --- a/pkg/installers/poetry/constants.go +++ b/pkg/installers/poetry/constants.go @@ -10,8 +10,9 @@ const ( PoetryLayerName = "poetry" CPython = "cpython" Pip = "pip" + EnvVersion = "BP_POETRY_VERSION" ) var Priorities = []interface{}{ - "BP_PIP_VERSION", + EnvVersion, } diff --git a/pkg/installers/poetry/detect.go b/pkg/installers/poetry/detect.go index 20320e8..b61265a 100644 --- a/pkg/installers/poetry/detect.go +++ b/pkg/installers/poetry/detect.go @@ -68,11 +68,11 @@ func Detect(parser PyProjectParser) packit.DetectFunc { requirements = append(requirements, pip.GetRequirement()) - if version, ok := os.LookupEnv("BP_POETRY_VERSION"); ok { + if version, ok := os.LookupEnv(EnvVersion); ok { requirements = append(requirements, packit.BuildPlanRequirement{ Name: PoetryDependency, Metadata: build.BuildPlanMetadata{ - VersionSource: "BP_POETRY_VERSION", + VersionSource: EnvVersion, Version: version, }, }) diff --git a/pkg/installers/poetry/detect_test.go b/pkg/installers/poetry/detect_test.go index 7c59376..323e969 100644 --- a/pkg/installers/poetry/detect_test.go +++ b/pkg/installers/poetry/detect_test.go @@ -83,7 +83,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { context("when the BP_POETRY_VERSION is set", func() { it.Before(func() { - t.Setenv("BP_POETRY_VERSION", "some-version") + t.Setenv(poetry.EnvVersion, "some-version") }) it("returns a plan that requires that version of poetry", func() { @@ -116,7 +116,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { { Name: poetry.PoetryDependency, Metadata: build.BuildPlanMetadata{ - VersionSource: "BP_POETRY_VERSION", + VersionSource: poetry.EnvVersion, Version: "some-version", }, }, diff --git a/pkg/installers/uv/constants.go b/pkg/installers/uv/constants.go index b8e37c6..24abe91 100644 --- a/pkg/installers/uv/constants.go +++ b/pkg/installers/uv/constants.go @@ -20,8 +20,10 @@ const ( DepKey = "dependency-sha" UvArchiveTemplateName = "uv-%s-unknown-linux-gnu" + + EnvVersion = "BP_UV_VERSION" ) var Priorities = []interface{}{ - "BP_UV_VERSION", + EnvVersion, } diff --git a/pkg/installers/uv/detect.go b/pkg/installers/uv/detect.go index c64e5ff..59bbf06 100644 --- a/pkg/installers/uv/detect.go +++ b/pkg/installers/uv/detect.go @@ -45,12 +45,12 @@ func Detect() packit.DetectFunc { }, } - if version, ok := os.LookupEnv("BP_UV_VERSION"); ok { + if version, ok := os.LookupEnv(EnvVersion); ok { plan.Requires = []packit.BuildPlanRequirement{ { Name: Uv, Metadata: build.BuildPlanMetadata{ - VersionSource: "BP_UV_VERSION", + VersionSource: EnvVersion, Version: version, }, }, diff --git a/pkg/installers/uv/detect_test.go b/pkg/installers/uv/detect_test.go index e62d21c..cca68d1 100644 --- a/pkg/installers/uv/detect_test.go +++ b/pkg/installers/uv/detect_test.go @@ -60,7 +60,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { context("when the BP_UV_VERSION is set", func() { it.Before(func() { - t.Setenv("BP_UV_VERSION", "some-version") + t.Setenv(uv.EnvVersion, "some-version") }) it("returns a plan that requires that version of uv", func() { @@ -77,7 +77,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) { { Name: uv.Uv, Metadata: build.BuildPlanMetadata{ - VersionSource: "BP_UV_VERSION", + VersionSource: uv.EnvVersion, Version: "some-version", }, },