diff --git a/lib/modules/datasource/artifactory/__fixtures__/releases-as-files.html b/lib/modules/datasource/artifactory/__fixtures__/releases-as-files.html index 2bdde583999c96..3d5bf59b799634 100644 --- a/lib/modules/datasource/artifactory/__fixtures__/releases-as-files.html +++ b/lib/modules/datasource/artifactory/__fixtures__/releases-as-files.html @@ -11,9 +11,9 @@

Index

          ..
          1.0.0  21-Jul-2021 20:08    -
-         1.0.1  23-Aug-2021 20:03    -
-         1.0.2  21-Jul-2021 20:09    -
-         1.0.3  06-Feb-2021 09:54    -
+         1.0.1  23-Aug-2021 20:03    12 MB
+         1.0.2  21-Jul-2021 20:09    123.45 GB
+         1.0.3  06-Feb-2021 09:54    9.0 KB
        

Artifactory Port 8080
diff --git a/lib/modules/datasource/artifactory/index.ts b/lib/modules/datasource/artifactory/index.ts index e66ffb4ebaac59..77eff31975492b 100644 --- a/lib/modules/datasource/artifactory/index.ts +++ b/lib/modules/datasource/artifactory/index.ts @@ -114,6 +114,9 @@ export class ArtifactoryDatasource extends Datasource { } private static parseReleaseTimestamp(rawText: string): string { - return rawText.trim().replace(regEx(/ ?-$/), '') + 'Z'; + return ( + rawText.split(regEx(/\s{2,}/)).filter((e) => !isNaN(Date.parse(e)))[0] + + 'Z' + ); } }