integrate author check into travis

This commit is contained in:
Patrick Kanzler 2017-05-26 01:55:30 +02:00
parent 3f9d44ff15
commit 7c17141fb2
No known key found for this signature in database
GPG Key ID: F07F07153306FCEF
4 changed files with 26 additions and 3 deletions

View File

@ -1,6 +1,8 @@
language: python language: python
sudo: false sudo: false
cache: pip cache: pip
git:
depth: 100000
addons: addons:
apt: apt:
packages: packages:
@ -37,6 +39,7 @@ matrix:
- python: pypy3 - python: pypy3
before_install: before_install:
- pip install tox codecov 'sphinx>=1.5.1' - pip install tox codecov 'sphinx>=1.5.1'
- ./doc/generate_authors.sh --check
script: script:
- tox - tox
- codecov - codecov

View File

@ -12,6 +12,15 @@ The pull requests and issues will be prefilled with templates. Please fill in yo
This project uses `semantic versioning <http://semver.org/>`_ and tries to adhere to the proposed rules as This project uses `semantic versioning <http://semver.org/>`_ and tries to adhere to the proposed rules as
well as possible. well as possible.
Author-list
-----------
This project keeps a list of authors. This can be auto-generated by calling `./doc/generate-authors.sh`.
When contributing the first time, please include a commit with the output of this script in place.
Otherwise the integration-check will fail.
When you change your username or mail-address, please also update the `.mailmap` and the authors-list.
Style-Guide Style-Guide
----------- -----------

14
doc/generate_authors.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
GENLIST=$(git shortlog -s -n | cut -f2 | sort)
AUTHORSFILE="$(dirname $0)/../AUTHORS"
TEMPAUTHORSFILE="/tmp/python-escpos-authorsfile"
if [ "$#" -eq 1 ]
then
echo "$GENLIST">$TEMPAUTHORSFILE
diff -q --from-file $AUTHORSFILE $TEMPAUTHORSFILE
else
echo "$GENLIST">$AUTHORSFILE
fi

View File

@ -1,3 +0,0 @@
#!/bin/sh
git shortlog -s -n | cut -f2 | sort