Fix prepare when using as git repository dependency

Co-authored-by: Ernesto García <ernestognw@gmail.com>
Co-authored-by: cairo <cairoeth@protonmail.com>
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
danilo neves cruz
2024-08-12 15:54:18 -03:00
committed by Hadrien Croubois
parent 0e7f530475
commit e5962430d7
2 changed files with 6 additions and 1 deletions

View File

@ -13,7 +13,7 @@
"coverage": "scripts/checks/coverage.sh",
"docs": "npm run prepare-docs && oz-docs",
"docs:watch": "oz-docs watch contracts docs/templates docs/config.js",
"prepare": "git config --local core.hooksPath .githooks",
"prepare": "scripts/prepare.sh",
"prepare-docs": "scripts/prepare-docs.sh",
"lint": "npm run lint:js && npm run lint:sol",
"lint:fix": "npm run lint:js:fix && npm run lint:sol:fix",

5
scripts/prepare.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
if git status &>/dev/null; then git config core.hooksPath .githooks; fi