UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Ironbank Containers
C
Container Hardening Tools
renovate
renovate
Commits
d310f9f2
Commit
d310f9f2
authored
Jul 23, 2021
by
Al Fontaine
Browse files
Merge branch 'development' into 'master'
fix for whl filename See merge request
!230
parents
afbe73fa
240f1266
Pipeline
#467291
failed with stages
in 93 minutes and 5 seconds
Changes
3
Pipelines
82
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
dist/manager/ironbank/update.js
dist/manager/ironbank/update.js
+6
-1
dist/manager/ironbank/update.js.map
dist/manager/ironbank/update.js.map
+1
-1
lib/manager/ironbank/update.ts
lib/manager/ironbank/update.ts
+12
-2
No files found.
dist/manager/ironbank/update.js
View file @
d310f9f2
...
...
@@ -61,6 +61,7 @@ async function getPypiData(url) {
const
output
=
{
sha
:
results
.
urls
[
i
].
digests
.
sha256
,
updatedUrl
:
results
.
urls
[
i
].
url
,
updatedFilename
:
results
.
urls
[
i
].
filename
,
};
return
output
;
}
...
...
@@ -140,12 +141,16 @@ async function updateDependency({ fileContent, upgrade, }) {
}
const
newValue
=
upgrade
.
newValue
;
const
oldUrl
=
upgrade
.
managerData
.
item
.
url
;
const
oldFilename
=
upgrade
.
managerData
.
item
.
filename
;
const
searchURL
=
`https://pypi.org/pypi/
${
upgrade
.
depName
}
/
${
newValue
}
/json`
;
const
updatedData
=
getPypiData
(
searchURL
);
let
newContent
=
fileContent
;
if
((
await
updatedData
).
sha
&&
(
await
updatedData
).
updatedUrl
)
{
if
((
await
updatedData
).
sha
&&
(
await
updatedData
).
updatedUrl
&&
(
await
updatedData
).
updatedFilename
)
{
newContent
=
newContent
.
replace
(
upgrade
.
managerData
.
item
.
validation
.
value
,
(
await
updatedData
).
sha
);
newContent
=
newContent
.
replace
(
oldUrl
,
(
await
updatedData
).
updatedUrl
);
newContent
=
newContent
.
replace
(
oldFilename
,
(
await
updatedData
).
updatedFilename
);
}
return
newContent
;
}
...
...
dist/manager/ironbank/update.js.map
View file @
d310f9f2
This diff is collapsed.
Click to expand it.
lib/manager/ironbank/update.ts
View file @
d310f9f2
...
...
@@ -55,7 +55,7 @@ async function getHashFromUrl(url: string): Promise<string | string> {
async
function
getPypiData
(
url
:
string
):
Promise
<
{
sha
:
string
;
updatedUrl
:
string
}
>
{
):
Promise
<
{
sha
:
string
;
updatedUrl
:
string
;
updatedFilename
:
string
}
>
{
logger
.
debug
(
`
${
'
getPypiData:
'
}
${
url
}
${
'
filename
'
}
`
);
try
{
const
result
=
await
http
.
get
(
url
);
...
...
@@ -67,6 +67,7 @@ async function getPypiData(
const
output
=
{
sha
:
results
.
urls
[
i
].
digests
.
sha256
,
updatedUrl
:
results
.
urls
[
i
].
url
,
updatedFilename
:
results
.
urls
[
i
].
filename
,
};
return
output
;
...
...
@@ -171,16 +172,25 @@ export async function updateDependency({
const
newValue
=
upgrade
.
newValue
;
const
oldUrl
=
upgrade
.
managerData
.
item
.
url
;
const
oldFilename
=
upgrade
.
managerData
.
item
.
filename
;
const
searchURL
=
`https://pypi.org/pypi/
${
upgrade
.
depName
}
/
${
newValue
}
/json`
;
const
updatedData
=
getPypiData
(
searchURL
);
let
newContent
=
fileContent
;
if
((
await
updatedData
).
sha
&&
(
await
updatedData
).
updatedUrl
)
{
if
(
(
await
updatedData
).
sha
&&
(
await
updatedData
).
updatedUrl
&&
(
await
updatedData
).
updatedFilename
)
{
newContent
=
newContent
.
replace
(
upgrade
.
managerData
.
item
.
validation
.
value
,
(
await
updatedData
).
sha
);
newContent
=
newContent
.
replace
(
oldUrl
,
(
await
updatedData
).
updatedUrl
);
newContent
=
newContent
.
replace
(
oldFilename
,
(
await
updatedData
).
updatedFilename
);
}
return
newContent
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment