Commit f986c9e8 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmgs: improve comments

rpmgs: remove .a, .so, .dll from downloaded sources
parent fc5ef89c
...@@ -427,6 +427,7 @@ update_predownloaded() ...@@ -427,6 +427,7 @@ update_predownloaded()
COMMITMSG="update predownloaded-$MODE with a hook script" COMMITMSG="update predownloaded-$MODE with a hook script"
fi fi
#### composer only part #### composer only part
if [ -s "./composer.json" ] ; then if [ -s "./composer.json" ] ; then
local COMMITMSG='' local COMMITMSG=''
...@@ -434,8 +435,8 @@ update_predownloaded() ...@@ -434,8 +435,8 @@ update_predownloaded()
[ "$MODE" = "production" ] && PRODUCTION='--no-dev' [ "$MODE" = "production" ] && PRODUCTION='--no-dev'
info "Detected composer install hook, running composer install $PRODUCTION ..." info "Detected composer install hook, running ..."
a= composer install $PRODUCTION || fatal docmd composer install $PRODUCTION || fatal
COMMITMSG="update php modules with composer install $PRODUCTION for $VERSION (see $SDNAME in .gear/rules)" COMMITMSG="update php modules with composer install $PRODUCTION for $VERSION (see $SDNAME in .gear/rules)"
if [ -s $RGD/.gear/predownloaded-postinstall-hook ] ; then if [ -s $RGD/.gear/predownloaded-postinstall-hook ] ; then
...@@ -443,12 +444,18 @@ update_predownloaded() ...@@ -443,12 +444,18 @@ update_predownloaded()
$RUNHOOK $RGD/.gear/predownloaded-postinstall-hook $MODE $VERSION $RUNHOOK $RGD/.gear/predownloaded-postinstall-hook $MODE $VERSION
fi 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 # drop all exclude vendor
# TODO: correct .* removing # TODO: correct .* removing
rm -rf $(ls -1 | grep -v vendor) .[a-zA-Z0-9]* rm -rf $(ls -1 | grep -v vendor) .[a-zA-Z0-9]*
fi fi
#### end of composer only part #### end of composer only part
#### go only part #### go only part
if [ -s "./go.mod" ] && [ ! -d "./vendor" ] ; then if [ -s "./go.mod" ] && [ ! -d "./vendor" ] ; then
local COMMITMSG='' local COMMITMSG=''
...@@ -456,8 +463,8 @@ update_predownloaded() ...@@ -456,8 +463,8 @@ update_predownloaded()
#[ "$MODE" = "production" ] && PRODUCTION='--no-dev' #[ "$MODE" = "production" ] && PRODUCTION='--no-dev'
info "Detected go.mod install hook, running go mod vendor $PRODUCTION ..." info "Detected go.mod install hook, running ..."
a= go mod vendor $PRODUCTION || fatal docmd go mod vendor $PRODUCTION || fatal
COMMITMSG="update vendored go modules with go mod vendor $PRODUCTION for $VERSION (see $SDNAME in .gear/rules)" 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 if [ -s $RGD/.gear/predownloaded-postinstall-hook ] ; then
...@@ -465,6 +472,11 @@ update_predownloaded() ...@@ -465,6 +472,11 @@ update_predownloaded()
$RUNHOOK $RGD/.gear/predownloaded-postinstall-hook $MODE $VERSION $RUNHOOK $RGD/.gear/predownloaded-postinstall-hook $MODE $VERSION
fi 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 # drop all exclude vendor
# TODO: correct .* removing # TODO: correct .* removing
rm -rf $(ls -1 | grep -v vendor) .[a-zA-Z0-9]* rm -rf $(ls -1 | grep -v vendor) .[a-zA-Z0-9]*
...@@ -512,8 +524,8 @@ update_predownloaded() ...@@ -512,8 +524,8 @@ update_predownloaded()
[ "$MODE" = "production" ] && PRODUCTION='--production' [ "$MODE" = "production" ] && PRODUCTION='--production'
info "Detected npm install hook, running npm install $PRODUCTION ..." info "Detected npm install hook, running ..."
a= npm install --verbose --no-optional --ignore-scripts $PRODUCTION || fatal 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)" COMMITMSG="update node_modules with npm install $PRODUCTION for $VERSION (see $SDNAME in .gear/rules)"
if [ -s $RGD/.gear/predownloaded-postinstall-hook ] ; then if [ -s $RGD/.gear/predownloaded-postinstall-hook ] ; then
...@@ -521,9 +533,14 @@ update_predownloaded() ...@@ -521,9 +533,14 @@ update_predownloaded()
$RUNHOOK $RGD/.gear/predownloaded-postinstall-hook $MODE $VERSION $RUNHOOK $RGD/.gear/predownloaded-postinstall-hook $MODE $VERSION
fi fi
# prune removes modules not listed in package.json # prune removes modules not listed in package.json
# a= npm prune $PRODUCTION # 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 # drop all exclude node_modules
# TODO: correct .* removing # TODO: correct .* removing
...@@ -537,7 +554,7 @@ update_predownloaded() ...@@ -537,7 +554,7 @@ update_predownloaded()
#epm assure jq || fatal #epm assure jq || fatal
#(cd node_modules && rm -rf $(jq -r -c '.devDependencies | keys[]' ../package.json)) #(cd node_modules && rm -rf $(jq -r -c '.devDependencies | keys[]' ../package.json))
fi fi
### end of npm part ### end of npm part
# some modules contains own .git # some modules contains own .git
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment