Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docker/fabric-nodeenv/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ INPUT_DIR=/chaincode/input
OUTPUT_DIR=/chaincode/output
cp -R ${INPUT_DIR}/src/. ${OUTPUT_DIR}
cd ${OUTPUT_DIR}
if [ -f package-lock.json -o -f npm-shrinkwrap.json ]; then
if [ -f chaincode.pkg ]; then
ls --ignore="chaincode.pkg" | xargs rm -rf
tar -xvf chaincode.pkg
mv package/* .
rm -rf chaincode.pkg package
elif [ -f package-lock.json -o -f npm-shrinkwrap.json ]; then
npm ci --only=production
else
npm install --production
fi
fi