fix: run scripts on npx

This commit is contained in:
Pietro Tamburini 2024-04-29 17:32:16 +02:00
parent 302ee1d517
commit 94fee30d2b
No known key found for this signature in database
GPG Key ID: FDD41DE51E2B1ABB
2 changed files with 7 additions and 7 deletions

View File

@ -1,14 +1,14 @@
#!/usr/bin/env bash
set -e
if ! [ -x "$(command -v standard-version)" ]; then
echo "standard-version is not installed. please run 'npm i -g standard-version'"
if ! [ -x "$(command -v npx)" ]; then
echo "Node.js is require, exiting..."
exit 1
fi
standard-version --dry-run --skip
npx standard-version --dry-run --skip
read -p "Continue (y/n)? " -n 1 -r
echo ;
if [[ $REPLY =~ ^[Yy]$ ]]; then
standard-version -s ;
npx standard-version -s ;
fi

View File

@ -1,11 +1,11 @@
#!/usr/bin/env bash
set -e
if ! [ -x "$(command -v commitlint)" ]; then
echo "commitlint is not installed. please run 'npm i -g commitlint'"
if ! [ -x "$(command -v npx)" ]; then
echo "Node.js is require, exiting..."
exit 1
fi
for commit_hash in $(git log --pretty=format:%H origin/master..HEAD); do
commitlint -f ${commit_hash}~1 -t ${commit_hash}
npx commitlint -f ${commit_hash}~1 -t ${commit_hash}
done