Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
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
korinf
etersoft-build-utils
Commits
f986c9e8
Commit
f986c9e8
authored
Sep 13, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgs: improve comments
rpmgs: remove .a, .so, .dll from downloaded sources
parent
fc5ef89c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
9 deletions
+26
-9
rpmgs
bin/rpmgs
+26
-9
No files found.
bin/rpmgs
View file @
f986c9e8
...
...
@@ -427,6 +427,7 @@ update_predownloaded()
COMMITMSG
=
"update predownloaded-
$MODE
with a hook script"
fi
#### composer only part
if
[
-s
"./composer.json"
]
;
then
local
COMMITMSG
=
''
...
...
@@ -434,8 +435,8 @@ update_predownloaded()
[
"
$MODE
"
=
"production"
]
&&
PRODUCTION
=
'--no-dev'
info
"Detected composer install hook, running
composer install
$PRODUCTION
..."
a
=
composer
install
$PRODUCTION
||
fatal
info
"Detected composer install hook, running ..."
docmd
composer
install
$PRODUCTION
||
fatal
COMMITMSG
=
"update php modules with composer install
$PRODUCTION
for
$VERSION
(see
$SDNAME
in .gear/rules)"
if
[
-s
$RGD
/.gear/predownloaded-postinstall-hook
]
;
then
...
...
@@ -443,12 +444,18 @@ update_predownloaded()
$RUNHOOK
$RGD
/.gear/predownloaded-postinstall-hook
$MODE
$VERSION
fi
info
"Removing binaries ..."
find vendor
-name
"*.a"
-type
f
-delete
-print
find vendor
-name
"*.so"
-type
f
-delete
-print
find vendor
-name
"*.dll"
-type
f
-delete
-print
# drop all exclude vendor
# TODO: correct .* removing
rm
-rf
$(
ls
-1
|
grep
-v
vendor
)
.[a-zA-Z0-9]
*
fi
#### end of composer only part
#### go only part
if
[
-s
"./go.mod"
]
&&
[
!
-d
"./vendor"
]
;
then
local
COMMITMSG
=
''
...
...
@@ -456,8 +463,8 @@ update_predownloaded()
#[ "$MODE" = "production" ] && PRODUCTION='--no-dev'
info
"Detected go.mod install hook, running
go mod vendor
$PRODUCTION
..."
a
=
go mod vendor
$PRODUCTION
||
fatal
info
"Detected go.mod install hook, running ..."
docmd
go mod vendor
$PRODUCTION
||
fatal
COMMITMSG
=
"update vendored go modules with go mod vendor
$PRODUCTION
for
$VERSION
(see
$SDNAME
in .gear/rules)"
if
[
-s
$RGD
/.gear/predownloaded-postinstall-hook
]
;
then
...
...
@@ -465,6 +472,11 @@ update_predownloaded()
$RUNHOOK
$RGD
/.gear/predownloaded-postinstall-hook
$MODE
$VERSION
fi
info
"Removing binaries ..."
find vendor
-name
"*.a"
-type
f
-delete
-print
find vendor
-name
"*.so"
-type
f
-delete
-print
find vendor
-name
"*.dll"
-type
f
-delete
-print
# drop all exclude vendor
# TODO: correct .* removing
rm
-rf
$(
ls
-1
|
grep
-v
vendor
)
.[a-zA-Z0-9]
*
...
...
@@ -512,8 +524,8 @@ update_predownloaded()
[
"
$MODE
"
=
"production"
]
&&
PRODUCTION
=
'--production'
info
"Detected npm install hook, running npm install
$PRODUCTION
..."
a
=
npm
install
--verbose
--no-optional
--ignore-scripts
$PRODUCTION
||
fatal
info
"Detected npm install hook, running
..."
docmd
npm
install
--verbose
--no-optional
--ignore-scripts
$PRODUCTION
||
fatal
COMMITMSG
=
"update node_modules with npm install
$PRODUCTION
for
$VERSION
(see
$SDNAME
in .gear/rules)"
if
[
-s
$RGD
/.gear/predownloaded-postinstall-hook
]
;
then
...
...
@@ -521,9 +533,14 @@ update_predownloaded()
$RUNHOOK
$RGD
/.gear/predownloaded-postinstall-hook
$MODE
$VERSION
fi
# prune removes modules not listed in package.json
# prune removes modules not listed in package.json
# a= npm prune $PRODUCTION
a
=
npm dedup
docmd npm dedup
info
"Removing binaries ..."
find vendor
-name
"*.a"
-type
f
-delete
-print
find vendor
-name
"*.so"
-type
f
-delete
-print
find vendor
-name
"*.dll"
-type
f
-delete
-print
# drop all exclude node_modules
# TODO: correct .* removing
...
...
@@ -537,7 +554,7 @@ update_predownloaded()
#epm assure jq || fatal
#(cd node_modules && rm -rf $(jq -r -c '.devDependencies | keys[]' ../package.json))
fi
fi
### end of npm part
# some modules contains own .git
...
...
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