Skip to content

Commit

Permalink
Add deployment through poetry to travis
Browse files Browse the repository at this point in the history
  • Loading branch information
maebert committed Jul 8, 2019
1 parent c2f7826 commit bcea98d
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 133 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,6 +2,7 @@

# C extensions
*.so
.python-version

# Packages
*.egg
Expand Down
24 changes: 17 additions & 7 deletions .travis.yml
@@ -1,11 +1,21 @@
dist: xenial # required for Python >= 3.7
language: python
python:
- "3.7"
python: "3.7"
before_install:
- pip install poetry
install:
- "pip install -e ."
- "pip install -q behave"
# command to run tests
- poetry install
script:
- python --version
- behave
- poetry run python --version
- poetry run behave
before_deploy:
- pip install poetry
- poetry config http-basic.pypi $PYPI_USER $PYPI_PASS
- poetry build
deploy:
provider: script
script: poetry publish
skip_cleanup: true
on:
branch: master
tags: true
23 changes: 19 additions & 4 deletions Makefile
Expand Up @@ -4,10 +4,10 @@ clean:
rm -rf dist
rm -rf _static
rm -rf jrnl.egg-info
rm -rf docs/_build
rm -rf _build
rm -rf _sources
rm -rf _static
rm -rf site/
rm -f *.html

html:
Expand All @@ -34,6 +34,21 @@ docs:
git push -u origin gh-pages ; \
git checkout master

# Upload to pipy
dist:
python setup.py publish
format: ## check style with flake8
poetry run black features jrnl

lint: ## check style with flake8
poetry run flake8 jrnl features --ignore E501

test: ## Run behave tests
poetry run behave

dist: clean ## builds source and wheel package
poetry build

release: dist ## package and upload a release
poetry publish
mkdocs gh-deploy

install: clean ## install the package to the active Python's site-packages
poetry install
14 changes: 4 additions & 10 deletions jrnl/__init__.py
@@ -1,14 +1,8 @@
#!/usr/bin/env python
# encoding: utf-8

import pkg_resources

"""
jrnl is a simple journal application for your command line.
"""
from __future__ import absolute_import

__title__ = 'jrnl'
__version__ = '2.0.0-rc1'
__author__ = 'Manuel Ebert'
__license__ = 'MIT License'
__copyright__ = 'Copyright 2013 - 2015 Manuel Ebert'
dist = pkg_resources.get_distribution('jrnl')
__title__ = dist.project_name
__version__ = dist.version

0 comments on commit bcea98d

Please sign in to comment.