Git config ensuring that 'nimble check' is executed before each commit

This commit is contained in:
Zahary Karadjov 2021-12-22 14:11:22 +02:00
parent f80cbf0ee2
commit 10a36f2b9f
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
4 changed files with 15 additions and 1 deletions

1
.gitignore vendored
View File

@ -6,4 +6,5 @@ nimble.develop
# Track changes in the scripts folder # Track changes in the scripts folder
!scripts/ !scripts/
!scripts/*

View File

@ -22,7 +22,7 @@ function _add_project {
--with-dependencies \ --with-dependencies \
"https://github.com/status-im/$PROJECT_NAME" "https://github.com/status-im/$PROJECT_NAME"
cp scripts/per-project.nimble.develop "$PROJECT_NAME/" cp scripts/per-project.nimble.develop "$PROJECT_NAME/nimble.develop"
} }
for p in $@ for p in $@

4
scripts/git-hooks/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
echo 'Creating a commit requires all Nimble checks to pass:'
nimble check

9
workspace.gitconfig Normal file
View File

@ -0,0 +1,9 @@
[core]
hooksPath = ../scripts/git-hooks
[url "git@github.com:"]
insteadOf = https://github.com/
[url "git@github.com:"]
insteadOf = https://www.github.com/