mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-07 20:53:54 -05:00
* feat(INJI-413): add talisman check for pre-commit and pre-push hooks Signed-off-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com> * feat(INJI-413): add yarn jetify to package.json Signed-off-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com> --------- Signed-off-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com> Co-authored-by: Pooja Babusingh <68894211+PoojaBabusingh@users.noreply.github.com>
35 lines
937 B
Bash
35 lines
937 B
Bash
#!/bin/bash
|
|
preCommitFile='.git/hooks/pre-commit'
|
|
prePushFile='.git/hooks/pre-push'
|
|
gitFolder='.git'
|
|
|
|
if [ ! -d $gitFolder ]
|
|
then
|
|
echo 'git not initialized'
|
|
else
|
|
if [ -f $preCommitFile ] && [ -z $GITHUB_ACTIONS ]
|
|
then
|
|
rm $preCommitFile
|
|
fi
|
|
|
|
if [ -f $prePushFile ] && [ -z $GITHUB_ACTIONS ]
|
|
then
|
|
rm $prePushFile
|
|
fi
|
|
|
|
if [ ! -f $preCommitFile ] && [ -z $GITHUB_ACTIONS ]
|
|
then
|
|
curl https://thoughtworks.github.io/talisman/install.sh > ~/install-talisman.sh
|
|
chmod +x ~/install-talisman.sh
|
|
~/install-talisman.sh pre-commit
|
|
echo 'pre-commit talisman hook installed'
|
|
fi
|
|
|
|
if [ ! -f $prePushFile ] && [ -z $GITHUB_ACTIONS ]
|
|
then
|
|
curl https://thoughtworks.github.io/talisman/install.sh > ~/install-talisman.sh
|
|
chmod +x ~/install-talisman.sh
|
|
~/install-talisman.sh pre-push
|
|
echo 'pre-push talisman hook installed'
|
|
fi
|
|
fi |