Ajout de composant (#7)
All checks were successful
Release / release (push) Successful in 57s
All checks were successful
Release / release (push) Successful in 57s
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [ ] Pas de régression - [ ] TU/TI/TF rédigée - [ ] TU/TI/TF OK - [ ] CHANGELOG modifié Co-authored-by: kevin <kevin@yuno.malio.fr> Reviewed-on: #7 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #7.
This commit is contained in:
28
pre-commit
Normal file
28
pre-commit
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "######### Pre-commit hook start #############"
|
||||
|
||||
# Prefer the exact Node version from .nvmrc for hooks (IDE + CLI consistency).
|
||||
if [ -f ".nvmrc" ]; then
|
||||
NVM_VERSION="$(tr -d '\r\n' < .nvmrc)"
|
||||
NVM_VERSION="${NVM_VERSION#v}"
|
||||
NVM_BIN="$HOME/.nvm/versions/node/v$NVM_VERSION/bin"
|
||||
if [ -x "$NVM_BIN/node" ] && [ -x "$NVM_BIN/npm" ]; then
|
||||
PATH="$NVM_BIN:$PATH"
|
||||
export PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v npm >/dev/null 2>&1; then
|
||||
echo "npm introuvable dans le hook. Abandon du commit."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Node $(node -v) / npm $(npm -v)"
|
||||
echo "--- make pre-commit start ---"
|
||||
make pre-commit
|
||||
echo "--- make pre-commit finished ---"
|
||||
|
||||
echo "All checks passed. Proceeding with commit."
|
||||
exit 0
|
||||
Reference in New Issue
Block a user