From d20a5ed98d81b466519ca903bd88f84c33e6f4e0 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sun, 3 Apr 2016 18:28:23 +0200 Subject: [PATCH] first travis config --- .travis.yml | 16 ++++++++++++++++ Makefile | 20 ++++++++++++++++++-- owncloud_news_updater/version.py | 2 +- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9d2d8b6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +sudo: false +language: python +python: + - "3.2" + - "3.3" + - "3.4" + - "3.5" + +before_install: + - pip install pep8 + +install: + - pip install -r requirements.txt + +script: + - make test \ No newline at end of file diff --git a/Makefile b/Makefile index d5f76e1..6fd16c6 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,36 @@ -# This makefile is only intended for development +# This file is licensed under the General Public License version 3 or +# later. See the LICENSE.txt file. +# @author Bernhard Posselt +# @copyright Bernhard Posselt 2016 +# This makefile is only intended for development +.PHONY: install install: sudo python3 setup.py install --install-scripts=/usr/bin +.PHONY: clean clean: rm -rf dist rm -rf MANIFEST rm -rf build rm -rf owncloud_news_updater.egg-info +.PHONY: update update: clean sudo pip3 uninstall owncloud_news_updater sudo python3 setup.py install +.PHONY: uninstall uninstall: clean sudo pip3 uninstall owncloud_news_updater +.PHONY: clean pypi: clean - python3 setup.py sdist upload \ No newline at end of file + python3 setup.py sdist upload + +.PHONY: test +test: + # keep it simple until we've got tests + pep8 owncloud_news_updater + python3 -m owncloud_news_updater --version + diff --git a/owncloud_news_updater/version.py b/owncloud_news_updater/version.py index 7bae68e..f1c6829 100644 --- a/owncloud_news_updater/version.py +++ b/owncloud_news_updater/version.py @@ -1,8 +1,8 @@ from os.path import dirname, realpath, join + def get_version(): directory = dirname(realpath(__file__)) version_file = join(directory, 'version.txt') with open(version_file, 'r') as infile: return ''.join(infile.read().split()) -