Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
d0203f9e
Unverified
Commit
d0203f9e
authored
4 years ago
by
Michael Kriese
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: Revert "feat(ci): Use data files from arbitrary path" (#9833)
This reverts commit
eb4f8451
.
parent
eb4f8451
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/manager/pip_setup/util.ts
+1
-1
1 addition, 1 deletion
lib/manager/pip_setup/util.ts
lib/versioning/node/schedule.ts
+1
-1
1 addition, 1 deletion
lib/versioning/node/schedule.ts
tools/generate-imports.ts
+7
-31
7 additions, 31 deletions
tools/generate-imports.ts
with
9 additions
and
33 deletions
lib/manager/pip_setup/util.ts
+
1
−
1
View file @
d0203f9e
...
@@ -16,7 +16,7 @@ export async function getExtractFile(): Promise<string> {
...
@@ -16,7 +16,7 @@ export async function getExtractFile(): Promise<string> {
const
cacheDir
=
await
ensureCacheDir
(
'
./others/pip_setup
'
);
const
cacheDir
=
await
ensureCacheDir
(
'
./others/pip_setup
'
);
extractPy
=
join
(
cacheDir
,
EXTRACT
);
extractPy
=
join
(
cacheDir
,
EXTRACT
);
await
outputFile
(
extractPy
,
dataFiles
.
get
(
'
data/
extract.py
'
));
await
outputFile
(
extractPy
,
dataFiles
.
get
(
'
extract.py
'
));
return
extractPy
;
return
extractPy
;
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/versioning/node/schedule.ts
+
1
−
1
View file @
d0203f9e
...
@@ -11,7 +11,7 @@ interface NodeJsSchedule {
...
@@ -11,7 +11,7 @@ interface NodeJsSchedule {
export
type
NodeJsData
=
Record
<
string
,
NodeJsSchedule
>
;
export
type
NodeJsData
=
Record
<
string
,
NodeJsSchedule
>
;
export
const
nodeSchedule
:
NodeJsData
=
JSON
.
parse
(
export
const
nodeSchedule
:
NodeJsData
=
JSON
.
parse
(
dataFiles
.
get
(
'
data/
node-js-schedule.json
'
)
dataFiles
.
get
(
'
node-js-schedule.json
'
)
);
);
export
interface
NodeJsPolicies
{
export
interface
NodeJsPolicies
{
...
...
This diff is collapsed.
Click to expand it.
tools/generate-imports.ts
+
7
−
31
View file @
d0203f9e
import
path
from
'
path
'
;
import
fs
from
'
fs-extra
'
;
import
fs
from
'
fs-extra
'
;
import
shell
from
'
shelljs
'
;
import
shell
from
'
shelljs
'
;
...
@@ -23,35 +22,12 @@ async function updateFile(file: string, code: string): Promise<void> {
...
@@ -23,35 +22,12 @@ async function updateFile(file: string, code: string): Promise<void> {
newFiles
.
add
(
file
);
newFiles
.
add
(
file
);
}
}
const
dataPaths
=
[
'
data
'
];
function
expandPaths
(
paths
:
string
[]):
string
[]
{
return
paths
.
map
((
pathName
)
=>
{
const
stat
=
fs
.
statSync
(
pathName
);
if
(
stat
.
isFile
())
{
return
[
pathName
];
}
if
(
stat
.
isDirectory
())
{
const
dirPaths
=
fs
.
readdirSync
(
pathName
,
{
withFileTypes
:
true
})
.
filter
(
(
dirent
)
=>
!
(
dirent
.
isFile
()
&&
[
'
.DS_Store
'
].
includes
(
dirent
.
name
))
)
.
map
((
dirent
)
=>
path
.
join
(
pathName
,
dirent
.
name
));
return
expandPaths
(
dirPaths
);
}
return
[];
})
.
reduce
((
x
,
y
)
=>
x
.
concat
(
y
));
}
async
function
generateData
():
Promise
<
void
>
{
async
function
generateData
():
Promise
<
void
>
{
const
files
=
expandPaths
(
dataPaths
).
sort
();
const
files
=
fs
.
readdirSync
(
'
data
'
,
{
withFileTypes
:
true
})
.
filter
((
dirent
)
=>
dirent
.
isFile
())
.
map
((
dirent
)
=>
dirent
.
name
)
.
sort
();
const
importDataFileType
=
files
.
map
((
x
)
=>
` | '
${
x
}
'`
).
join
(
'
\n
'
);
const
importDataFileType
=
files
.
map
((
x
)
=>
` | '
${
x
}
'`
).
join
(
'
\n
'
);
...
@@ -59,8 +35,8 @@ async function generateData(): Promise<void> {
...
@@ -59,8 +35,8 @@ async function generateData(): Promise<void> {
const
contentMapAssignments
:
string
[]
=
[];
const
contentMapAssignments
:
string
[]
=
[];
for
(
const
file
of
files
)
{
for
(
const
file
of
files
)
{
shell
.
echo
(
`>
${
file
}
`
);
shell
.
echo
(
`>
data/
${
file
}
`
);
const
rawFileContent
=
await
fs
.
readFile
(
file
,
'
utf8
'
);
const
rawFileContent
=
await
fs
.
readFile
(
`data/
${
file
}
`
,
'
utf8
'
);
contentMapAssignments
.
push
(
contentMapAssignments
.
push
(
`data.set('
${
file
}
',
${
JSON
.
stringify
(
rawFileContent
)}
);`
`data.set('
${
file
}
',
${
JSON
.
stringify
(
rawFileContent
)}
);`
);
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment