diff --git a/.meta/.snapcraft.yml b/.meta/.snapcraft.yml index fb8acc6..be3f78f 100644 --- a/.meta/.snapcraft.yml +++ b/.meta/.snapcraft.yml @@ -10,14 +10,16 @@ license: MPL-2.0 parts: git-fame: plugin: python - python-version: python3 python-packages: [tqdm, pyyaml] stage-packages: [git] source: {source} source-commit: '{commit}' parse-info: [setup.py] + override-build: | + snapcraftctl build + cp $SNAPCRAFT_PART_BUILD/git-fame_completion.bash $SNAPCRAFT_PART_INSTALL/completion.sh apps: git-fame: command: bin/git-fame - #completer: git-fame_completion.bash + completer: completion.sh plugs: [home] diff --git a/.travis.yml b/.travis.yml index 7e56bb5..45ff2d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ stages: - check - test - name: deploy - if: repo = tqdm/tqdm + if: repo = casperdcl/git-fame jobs: include: - stage: test @@ -38,10 +38,10 @@ jobs: python: 3.7 env: TOXENV=py37 - name: pypy2.7 - python: pypy2.7-5.10.0 + python: pypy env: TOXENV=pypy - - name: pypy3.5 - python: pypy3.5-5.10.0 + - name: pypy3 + python: pypy3 env: TOXENV=pypy3 - stage: check name: style @@ -56,7 +56,10 @@ jobs: - stage: deploy name: PyPI and GitHub python: 3.7 - dist: xenial + addons: + apt: + packages: + - pandoc install: script: - pip install .[dev] @@ -81,12 +84,13 @@ jobs: draft: true name: git-fame $TRAVIS_TAG stable edge: true + tag_name: $TRAVIS_TAG + target_commitish: $TRAVIS_COMMIT release_notes_file: CHANGES.md on: tags: true - name: docker python: 3.7 - dist: xenial services: - docker install: @@ -107,19 +111,57 @@ jobs: on: tags: true - provider: script - script: docker push docker.pkg.github.com/casperdcl/git-fame/git-fame:${TRAVIS_TAG#v} + script: 'docker push docker.pkg.github.com/casperdcl/git-fame/git-fame:${TRAVIS_TAG#v} || :' on: tags: true - provider: script script: docker push casperdcl/git-fame:latest - provider: script - script: docker push docker.pkg.github.com/casperdcl/git-fame/git-fame:latest + script: 'docker push docker.pkg.github.com/casperdcl/git-fame/git-fame:latest || :' - provider: script script: docker push casperdcl/git-fame:devel on: branch: devel - provider: script - script: docker push docker.pkg.github.com/casperdcl/git-fame/git-fame:devel + script: 'docker push docker.pkg.github.com/casperdcl/git-fame/git-fame:devel || :' + on: + branch: devel + - name: snap + python: 3.7 + addons: + snaps: + - name: snapcraft + channel: stable + confinement: classic + - name: lxd + channel: stable + env: + - SNAPCRAFT_IMAGE_INFO: '{"build_url": "$TRAVIS_BUILD_URL"}' + before_install: + - sudo /snap/bin/lxd.migrate -yes + - sudo /snap/bin/lxd waitready + - sudo /snap/bin/lxd init --auto + install: + - make snapcraft.yaml + script: + - sudo snapcraft --use-lxd + after_failure: + - sudo journalctl -u snapd + deploy: + - provider: snap + snap: git-fame*.snap + channel: stable + skip_cleanup: true + on: + tags: true + - provider: snap + snap: git-fame*.snap + channel: candidate + skip_cleanup: true + - provider: snap + snap: git-fame*.snap + channel: edge + skip_cleanup: true on: branch: devel before_install: diff --git a/Makefile b/Makefile index 1f8da4f..d77a76d 100644 --- a/Makefile +++ b/Makefile @@ -41,18 +41,17 @@ all: @+make build flake8: - @+flake8 --max-line-length=80 --ignore=E111,E114 --exclude .tox,build \ - -j 8 --count --statistics --exit-zero . + @+flake8 -j 8 --count --statistics --exit-zero . test: - tox --skip-missing-interpreters + tox --skip-missing-interpreters -p all testnose: nosetests gitfame -d -v testsetup: @make gitfame/git-fame.1 - python setup.py check --restructuredtext --strict + python setup.py check --metadata --restructuredtext --strict python setup.py make none testcoverage: @@ -78,7 +77,7 @@ snapcraft.yaml: .meta/.snapcraft.yml .dockerignore: .gitignore cat $^ > "$@" - echo ".git" >> "$@" + echo ".git" > "$@" git clean -xdn | sed -nr 's/^Would remove (.*)$$/\1/p' >> "$@" distclean: @@ -124,7 +123,7 @@ buildupload: @make pypi snap: - @make snapcraft.yaml + @make -B snapcraft.yaml snapcraft docker: @make .dockerignore diff --git a/git-fame_completion.bash b/git-fame_completion.bash index 6ab25d9..203adea 100644 --- a/git-fame_completion.bash +++ b/git-fame_completion.bash @@ -30,3 +30,4 @@ _git_fame() ;; esac } +complete -F _git_fame git-fame diff --git a/gitfame/_version.py b/gitfame/_version.py index 44c642b..319bcc4 100644 --- a/gitfame/_version.py +++ b/gitfame/_version.py @@ -12,7 +12,7 @@ __all__ = ["__version__"] # major, minor, patch, -extra -version_info = 1, 10, 1 +version_info = 1, 10, 2 # Nice string for the version __version__ = '.'.join(map(str, version_info)) diff --git a/setup.cfg b/setup.cfg index 2a9acf1..192387d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,7 @@ [bdist_wheel] universal = 1 + +[flake8] +max-line-length=80 +ignore=E111,E114 +exclude=.tox,build diff --git a/tox.ini b/tox.ini index 812431b..336b8cc 100644 --- a/tox.ini +++ b/tox.ini @@ -55,6 +55,13 @@ commands = {[coverage]commands} codecov +[testenv:py34] +deps = + {[extra]deps} + tqdm + pyyaml==5.2 +commands = {[extra]commands} + [testenv:nodeps] deps = {[extra]deps}