diff --git a/lib/modules/manager/mix/__fixtures__/mix.exs b/lib/modules/manager/mix/__fixtures__/mix.exs index fe1c24b7c78f875a4827aceea0d36e89029d1f6b..3bb83fc5d2da7be7e9130e317205abe6961821b9 100644 --- a/lib/modules/manager/mix/__fixtures__/mix.exs +++ b/lib/modules/manager/mix/__fixtures__/mix.exs @@ -30,6 +30,7 @@ defmodule MyProject.MixProject do {:jason, ">= 1.0.0"}, {:jason, "~> 1.0", optional: true}, + {:phoenix, "== 1.6.14"}, ] end end diff --git a/lib/modules/manager/mix/extract.spec.ts b/lib/modules/manager/mix/extract.spec.ts index 3ccc432018680a9c58eef0f58dc2131046b87501..3703f2f4877d491a9bd417aabb36bb0db0024875 100644 --- a/lib/modules/manager/mix/extract.spec.ts +++ b/lib/modules/manager/mix/extract.spec.ts @@ -79,6 +79,13 @@ describe('modules/manager/mix/extract', () => { depName: 'jason', packageName: 'jason', }, + { + currentValue: '== 1.6.14', + currentVersion: '1.6.14', + datasource: 'hex', + depName: 'phoenix', + packageName: 'phoenix', + }, ]); }); }); diff --git a/lib/modules/manager/mix/extract.ts b/lib/modules/manager/mix/extract.ts index 54bd5e5717ec7273a0cc7e6d13bfea89e34ef9a0..3d4f58f8a93d50ce77fe7e6e40240426a4d6b277 100644 --- a/lib/modules/manager/mix/extract.ts +++ b/lib/modules/manager/mix/extract.ts @@ -59,6 +59,9 @@ export async function extractPackageFile( datasource: HexDatasource.id, packageName: organization ? `${app}:${organization}` : app, }; + if (requirement?.startsWith('==')) { + dep.currentVersion = requirement.replace(regEx(/^==\s*/), ''); + } } deps.push(dep);