diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..7f40f85 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,11 @@ +kind: pipeline +name: default +steps: + - name: test + image: python + commands: + - pip install pipenv + - pipenv install + - pipenv run gitlint + - pipenv run pylint setup.py gitea_auto_update + - pipenv run python -m unittest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 528b53d..79fe0bf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,7 @@ repos: rev: pylint-2.5.0 hooks: - id: pylint + additional_dependencies: ['packaging', 'requests'] - repo: https://github.com/jorisroovers/gitlint rev: v0.13.1 hooks: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index adb4d51..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -dist: xenial -language: python -python: - - "3.7" -cache: pip -install: - - pip install pipenv - - pipenv install -script: - - gitlint - - pylint setup.py gitea_auto_update - - python -m unittest diff --git a/README.md b/README.md index 497a5cb..39e3a97 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Gitea Auto Update -[![Build Status](https://travis-ci.org/CMiksche/gitea-auto-update.svg?branch=master)](https://travis-ci.org/CMiksche/gitea-auto-update) +[![Build Status](https://cloud.drone.io/api/badges/CMiksche/gitea-auto-update/status.svg)](https://cloud.drone.io/CMiksche/gitea-auto-update) [![PyPI version](https://badge.fury.io/py/gitea-auto-update.svg)](https://badge.fury.io/py/gitea-auto-update) [![Downloads](https://pepy.tech/badge/gitea-auto-update)](https://pepy.tech/project/gitea-auto-update) diff --git a/gitea_auto_update/lib/version.py b/gitea_auto_update/lib/version.py index 1545765..21f8e88 100644 --- a/gitea_auto_update/lib/version.py +++ b/gitea_auto_update/lib/version.py @@ -51,7 +51,7 @@ class Version: try: current_version = requests.get(self.gt_site).json()['version'] if current_version.status_code != 200: - raise RuntimeError("Could not download version.") + raise RuntimeError("Could not download version.") from None except RuntimeError: # To allow installation, return a default version of "0.0.0". current_version = "0.0.0"