Only recompile if a .js or .json file was changed

This commit is contained in:
Benoit Daloze
2022-08-27 10:22:45 +02:00
parent 0a29871fe2
commit 658402fc50
+6 -3
View File
@@ -1,5 +1,8 @@
#!/usr/bin/sh
set -e
yarn install
yarn run package
exec git add dist/index.js
if git diff --cached --name-only | grep -E '.(js|json)$'; then
yarn install
yarn run package
exec git add dist/index.js
fi