Browse Source

Add regex corrections for alpine in the Docker export scripts

dev
David Ludwig 4 years ago
parent
commit
bfd9b51281
2 changed files with 16 additions and 2 deletions
  1. +8
    -1
      docker/scripts/export_builds.sh
  2. +8
    -1
      docker/scripts/export_deps.sh

+ 8
- 1
docker/scripts/export_builds.sh View File

@ -3,7 +3,14 @@
# Create the exported directory
mkdir -p build
if [ "$1" = "alpine" ]; then
REGEX='\./\(\(api\|packages\)/[^/]\+/dist/lib\|services/[^/]\+/dist\)'
else
REGEX='\./\(\(api\|packages\)/[^/]+/dist/lib\|services/[^/]+/dist\)'
fi
# Locate services/packages and grab only the built files (excluding types if any)
for file in $(find . -regex '\./\(\(api\|packages\)/[^/]+/dist/lib\|services/[^/]+/dist\)'); do
for file in $(find . -regex $REGEX); do
echo $file;
cp --parents -R $file build;
done

+ 8
- 1
docker/scripts/export_deps.sh View File

@ -3,7 +3,14 @@
# Create the exported directory
mkdir -p build
if [ "$1" = "alpine" ]; then
REGEX='\./\(api\|services\|packages\)/[^/]\+/\(package.json\|node_modules\)'
else
REGEX='\./\(api\|services\|packages\)/[^/]+/\(package.json\|node_modules\)'
fi
# Locate services/packages and grab only the dependencies + package.json
for file in $(find . -regex '\./\(api\|services\|packages\)/[^/]+/\(package.json\|node_modules\)'); do
for file in $(find . -regex $REGEX); do
echo $file;
cp --parents -R $file build;
done

Loading…
Cancel
Save