Merge pull request #8180 from tomamplius/clean_script
Single Image build clean up: replace move with rm
This commit is contained in:
commit
f559d5d953
|
@ -1,16 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
dir=$(pwd)
|
KEEP="dist|package.json|yarn.lock|client|builder|build|pm2.config.js|docker_run.sh"
|
||||||
declare -a keep=("dist" "package.json" "yarn.lock" "client" "builder" "build" "pm2.config.js" "docker_run.sh")
|
echo "Removing unneeded build files:"
|
||||||
for moveDir in "${keep[@]}"
|
ls | egrep -v $KEEP | xargs rm -rfv
|
||||||
do
|
|
||||||
mv $moveDir / 2>/dev/null
|
|
||||||
done
|
|
||||||
cd /
|
|
||||||
rm -r $dir
|
|
||||||
mkdir $dir
|
|
||||||
for keepDir in "${keep[@]}"
|
|
||||||
do
|
|
||||||
mv /$keepDir $dir/ 2>/dev/null
|
|
||||||
done
|
|
||||||
cd $dir
|
|
||||||
NODE_ENV=production yarn
|
NODE_ENV=production yarn
|
||||||
|
|
Loading…
Reference in New Issue