Skip to content

Commit c27e24a

Browse files
committed
Update package.sh.
1 parent b776294 commit c27e24a

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

package.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
#!/bin/bash
1+
#!/bin/bash -e
22

33
rm -rf node_modules
4+
45
npm install --production
5-
rm -f SHA256SUMS
6-
sha256sum manifest.json package.json *.js LICENSE README.md > SHA256SUMS
7-
rm -rf node_modules/.bin
8-
find node_modules -type f -exec sha256sum {} \; >> SHA256SUMS
9-
TARFILE=$(npm pack)
6+
7+
shasum --algorithm 256 manifest.json package.json *.js LICENSE README.md > SHA256SUMS
8+
9+
find node_modules \( -type f -o -type l \) -exec shasum --algorithm 256 {} \; >> SHA256SUMS
10+
11+
TARFILE=`npm pack`
12+
1013
tar xzf ${TARFILE}
1114
cp -r node_modules ./package
1215
tar czf ${TARFILE} package
13-
rm -rf package
14-
echo "Created ${TARFILE}"
16+
17+
shasum --algorithm 256 ${TARFILE} > ${TARFILE}.sha256sum
18+
19+
rm -rf SHA256SUMS package

0 commit comments

Comments
 (0)