Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
438588b8
Commit
438588b8
authored
Mar 03, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-restore: add nupkg restore support
parent
199762c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
3 deletions
+37
-3
epm-restore
bin/epm-restore
+37
-3
No files found.
bin/epm-restore
View file @
438588b8
#!/bin/sh
#
# Copyright (C) 2021 Etersoft
# Copyright (C) 2021 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 202
0, 202
1 Etersoft
# Copyright (C) 202
0, 202
1 Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
...
...
@@ -256,6 +256,33 @@ __epm_print_npm_list()
[
-n
"
$dryrun
"
]
||
echo
"
$ilist
"
}
__epm_print_nupkg_list
()
{
a
=
dotnet list
$1
package |
grep
"^ > "
|
while
read
n name req other
;
do
if
[
-n
"
$dryrun
"
]
;
then
echo
"BuildRequires: nupkg(
$name
) >=
$req
"
else
echo
"nupkg(
$name
)"
fi
done
}
__epm_restore_nupkg
()
{
local
req_file
=
"
$1
"
if
[
-n
"
$dryrun
"
]
;
then
echo
"# generated via dotnet list
$(
basename
$(
dirname
$(
realpath
"
$req_file
"
)))
/
$(
basename
"
$req_file
"
)
package"
__epm_print_nupkg_list
$req_file
return
fi
info
"Install requirements from
$req_file
..."
ilist
=
$(
__epm_print_nupkg_list
$req_file
)
ilist
=
"
$(
estrlist list
$ilist
)
"
docmd epm
install
$ilist
}
__epm_restore_npm
()
{
local
req_file
=
"
$1
"
...
...
@@ -321,6 +348,10 @@ __epm_restore_by()
package.json
)
[
-s
"
$req_file
"
]
&&
__epm_restore_npm
"
$req_file
"
;;
*
.sln|
*
.csproj
)
local
PROJ
=
"
$(
echo
$req_file
)
"
[
-s
"
$PROJ
"
]
&&
__epm_restore_nupkg
"
$PROJ
"
;;
Gemfile|package.json
)
info
"
$req_file
support is not implemented yet"
;;
...
...
@@ -347,7 +378,10 @@ epm_restore()
# TODO: nowhere works: python3 setup.py --requires
# if run with empty args
for
i
in
requirements.txt requirements/default.txt requirements_dev.txt requirements-dev.txt requirements/dev.txt dev-requirements.txt requirements-test.txt requirements_test.txt requirements/test.txt test-requirements.txt Gemfile requires.txt package.json setup.py python_dependencies.py
;
do
for
i
in
requirements.txt requirements/default.txt requirements_dev.txt requirements-dev.txt requirements/dev.txt dev-requirements.txt
\
requirements-test.txt requirements_test.txt requirements/test.txt test-requirements.txt
\
Gemfile requires.txt package.json setup.py python_dependencies.py
\
*
.sln
*
.csproj
;
do
__epm_restore_by
$i
done
...
...
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