Skip to content

Commit

Permalink
fix(conan): allow include_prerelease without argument
Browse files Browse the repository at this point in the history
In Conan 2.x include_prerelease do not have an argument
  • Loading branch information
dkoerner-festo committed Jan 10, 2024
1 parent 136e560 commit c700630
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/modules/versioning/conan/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ export function makeVersion(
export function cleanVersion(version: string): string {
if (version) {
return version
.replace(regEx(/,|\[|\]|"|include_prerelease=|loose=|True|False/g), '')
.replace(
regEx(
/,|\[|\]|"|include_prerelease=|include_prerelease|loose=|True|False/g,
),
'',
)
.trim();
}
return version;
Expand All @@ -44,7 +49,7 @@ export function getOptions(input: string): {
let loose = true;
if (input) {
includePrerelease =
input.includes('include_prerelease=True') &&
input.includes('include_prerelease') &&
!input.includes('include_prerelease=False');
loose = input.includes('loose=True') || !input.includes('loose=False');
}
Expand Down

0 comments on commit c700630

Please sign in to comment.