first travis config
This commit is contained in:
Родитель
44920b4e88
Коммит
d20a5ed98d
|
@ -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
|
18
Makefile
18
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 <dev@bernhard-posselt.com>
|
||||
# @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
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
# keep it simple until we've got tests
|
||||
pep8 owncloud_news_updater
|
||||
python3 -m owncloud_news_updater --version
|
||||
|
||||
|
|
|
@ -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())
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче