Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

Commit b92d025

Browse files
janazTomasz Janowski
authored andcommitted
Create archive outside of the working directory
1 parent 25ee738 commit b92d025

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

auto/package-cmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ DIR="$( cd "$( dirname "$0" )" && pwd )"
77
cd "${DIR}/.."
88

99
tmp_dir="tmp"
10-
stage_dir="stage"
10+
stage_dir="stage/work"
1111
node_dir="${tmp_dir}/${NODE_VERSION}"
1212
node_archive="node-v${NODE_VERSION}-linux-x64.tar.xz"
1313

@@ -25,12 +25,12 @@ mkdir -p "${node_dir}"
2525
tar -xJ -f "${tmp_dir}/${node_archive}" --strip 1 -C "${node_dir}"
2626

2727
#prepare staging dir
28+
rm -rf "${stage_dir}" "${stage_dir}"/../layer.zip
2829
mkdir -p "${stage_dir}"
29-
rm -rf "${stage_dir}"/*
3030
cp -a package.json yarn.lock src/* "${node_dir}"/bin/node "${stage_dir}/"
3131

3232
#install deps and create archive
3333
cd "${stage_dir}"
3434
yarn install --frozen-lockfile --production --no-bin-links --ignore-optional
3535
rm -f yarn.lock package.json
36-
7za a -mx9 -r layer.zip .
36+
7za a -mx9 -r ../layer.zip .

0 commit comments

Comments
 (0)