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
sha: 97b88d9610bcc03982ddac33caba98bb2b751f5f
sha: v0.7.1
hooks:
- id: check-added-large-files
- id: check-yaml
- id: check-merge-conflict
- repo: https://www.shore.co.il/git/shell-pre-commit/
sha: v0.1.0
sha: v0.3.0
hooks:
- id: shell-lint
files: ssh-ca
......@@ -14,5 +14,5 @@
- id: test
name: make test
language: system
entry: make test
entry: make clean test
files: ssh-ca|Makefile
.PHONY: install test
.PHONY: install test clean
USERNAME = $$(whoami)
clean:
git clean -fdx
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
test "$$(ssh -F ssh_config test whoami)" = "$$USER"
......
#!/bin/sh -e
#!/bin/sh
set -eu
error () {
echo "$1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment