mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
fix: don't semver filter git-refs and git-tags (#13043)
Closes #13034 Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
This commit is contained in:
parent
bcea3254ad
commit
eeedadede7
2 changed files with 1 additions and 5 deletions
|
@ -1,6 +1,5 @@
|
||||||
import { cache } from '../../util/cache/package/decorator';
|
import { cache } from '../../util/cache/package/decorator';
|
||||||
import { regEx } from '../../util/regex';
|
import { regEx } from '../../util/regex';
|
||||||
import * as semver from '../../versioning/semver';
|
|
||||||
import { Datasource } from '../datasource';
|
import { Datasource } from '../datasource';
|
||||||
import type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types';
|
import type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types';
|
||||||
import { GitDatasource } from './base';
|
import { GitDatasource } from './base';
|
||||||
|
@ -32,8 +31,7 @@ export class GitRefsDatasource extends Datasource {
|
||||||
|
|
||||||
const refs = rawRefs
|
const refs = rawRefs
|
||||||
.filter((ref) => ref.type === 'tags' || ref.type === 'heads')
|
.filter((ref) => ref.type === 'tags' || ref.type === 'heads')
|
||||||
.map((ref) => ref.value)
|
.map((ref) => ref.value);
|
||||||
.filter((ref) => semver.isVersion(ref));
|
|
||||||
|
|
||||||
const uniqueRefs = [...new Set(refs)];
|
const uniqueRefs = [...new Set(refs)];
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { cache } from '../../util/cache/package/decorator';
|
import { cache } from '../../util/cache/package/decorator';
|
||||||
import { regEx } from '../../util/regex';
|
import { regEx } from '../../util/regex';
|
||||||
import * as semver from '../../versioning/semver';
|
|
||||||
import { Datasource } from '../datasource';
|
import { Datasource } from '../datasource';
|
||||||
import { GitDatasource } from '../git-refs/base';
|
import { GitDatasource } from '../git-refs/base';
|
||||||
import type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types';
|
import type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types';
|
||||||
|
@ -28,7 +27,6 @@ export class GitTagsDatasource extends Datasource {
|
||||||
}
|
}
|
||||||
const releases = rawRefs
|
const releases = rawRefs
|
||||||
.filter((ref) => ref.type === 'tags')
|
.filter((ref) => ref.type === 'tags')
|
||||||
.filter((ref) => semver.isVersion(ref.value))
|
|
||||||
.map((ref) => ({
|
.map((ref) => ({
|
||||||
version: ref.value,
|
version: ref.value,
|
||||||
gitRef: ref.value,
|
gitRef: ref.value,
|
||||||
|
|
Loading…
Reference in a new issue