Skip to content
Snippets Groups Projects
Commit 8ac53385 authored by nimrod's avatar nimrod
Browse files

- Removed clean target, use git clean instead.

- Moved test to pre-commit.
- Removed lint target, pre-commit already does that.
- Removed useless pre-commit checks.
- Added Travis CI.
- Filled in fields in license.
- Updated README accordingly.
parent c2d90b8d
Branches master
No related tags found
No related merge requests found
...@@ -2,12 +2,17 @@ ...@@ -2,12 +2,17 @@
sha: 97b88d9610bcc03982ddac33caba98bb2b751f5f sha: 97b88d9610bcc03982ddac33caba98bb2b751f5f
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-json
- id: check-xml
- 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: 604fe77b53d3514d5ad0f66764c7783850bb6e98 sha: v0.1.0
hooks: hooks:
- id: shell-lint - id: shell-lint
files: ssh-ca files: ssh-ca
- repo: local
hooks:
- id: test
name: make test
language: system
entry: make test
files: ssh-ca|Makefile
---
language: python
python: "2.7"
dist: trusty
sudo: false
group: beta
cache:
- pip
- directories:
- $HOME/.pre-commit
addons:
apt:
packages:
- openssh-server
- openssh-client
- build-essential
install:
- pip install pre_commit
script:
- pre-commit run --all-files
notifications:
email: false
The MIT License (MIT) MIT License
Copyright (c) [year] [fullname] Copyright (c) 2016 Adar Nimrod
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
......
.PHONY: install clean test lint .PHONY: install test
USERNAME = $$(whoami) USERNAME = $$(whoami)
test: lint clean 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"
kill $$(cat sshd.pid) kill $$(cat sshd.pid)
...@@ -49,10 +49,3 @@ ssh_config: ...@@ -49,10 +49,3 @@ ssh_config:
install: install:
cp ssl-ca /usr/local/bin/ssh-ca cp ssl-ca /usr/local/bin/ssh-ca
chmod 755 /usr/local/bin/ssh-ca chmod 755 /usr/local/bin/ssh-ca
clean:
if [ -f sshd.pid ] && [ -d "/proc/$$(cat sshd.pid)" ]; then kill "$$(cat sshd.pid)"; fi
rm -rf CA CA.pub users hosts known_hosts sshd.pid sshd_config ssh_config
lint:
/bin/sh -en ssh-ca
SSH-CA SSH-CA
###### ######
.. image:: https://travis-ci.org/adarnimrod/ssh-ca.svg?branch=master
:target: https://travis-ci.org/adarnimrod/ssh-ca
This utility assists in creating an SSH certificate authority. It aims to be This utility assists in creating an SSH certificate authority. It aims to be
production-ready and a secure solution for managing SSH key-pairs for both users production-ready and a secure solution for managing SSH key-pairs for both users
and hosts. and hosts.
...@@ -87,10 +90,9 @@ Authenticating users ...@@ -87,10 +90,9 @@ Authenticating users
Development Development
----------- -----------
To ease development :code:`make clean`, :code:`make lint` and :code:`make test` For testing run :code:`make test`. For cleaning temporary files run :code:`git
are available. It's recommended to add :code:`make lint` and :code:`make test` clean -fdx`. You can use `pre-commit <http://pre-commit.com/>`_ to have the test
to to your Git pre-commit and pre-push hooks accordingly. Also, this repo has (which is quite quick) run on every commit to ensure quality code.
`pre-commit <http://pre-commit.com/>`_ configured.
License License
------- -------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment