Skip to content
Snippets Groups Projects
Commit 669a3e67 authored by nimrod's avatar nimrod
Browse files

- Set pre-commit hooks version using tags instead of hashes.

- Added clean target (use git clean).
- Set shell parameters using set instead of appending to the shabang
line.
- Clean beforing testing in pre-commit.
parent 8ac53385
No related branches found
No related tags found
No related merge requests found
- repo: git://github.com/pre-commit/pre-commit-hooks - repo: git://github.com/pre-commit/pre-commit-hooks
sha: 97b88d9610bcc03982ddac33caba98bb2b751f5f sha: v0.7.1
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-yaml - id: check-yaml
- id: check-merge-conflict - id: check-merge-conflict
- repo: https://www.shore.co.il/git/shell-pre-commit/ - repo: https://www.shore.co.il/git/shell-pre-commit/
sha: v0.1.0 sha: v0.3.0
hooks: hooks:
- id: shell-lint - id: shell-lint
files: ssh-ca files: ssh-ca
...@@ -14,5 +14,5 @@ ...@@ -14,5 +14,5 @@
- id: test - id: test
name: make test name: make test
language: system language: system
entry: make test entry: make clean test
files: ssh-ca|Makefile files: ssh-ca|Makefile
.PHONY: install test .PHONY: install test clean
USERNAME = $$(whoami) USERNAME = $$(whoami)
clean:
git clean -fdx
test: ssh_config sshd_config CA CA.pub users/$(USERNAME) hosts/localhost known_hosts test: ssh_config sshd_config CA CA.pub users/$(USERNAME) hosts/localhost known_hosts
$$(PATH=$$PATH:/usr/local/sbin:/usr/sbin:/sbin which sshd) -f sshd_config $$(PATH=$$PATH:/usr/local/sbin:/usr/sbin:/sbin which sshd) -f sshd_config
test "$$(ssh -F ssh_config test whoami)" = "$$USER" test "$$(ssh -F ssh_config test whoami)" = "$$USER"
......
#!/bin/sh -e #!/bin/sh
set -eu
error () { error () {
echo "$1" echo "$1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment