From 2b71f09c7b5c4b4744c0937e462bdbf841a2ee93 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Sun, 24 Nov 2019 00:34:52 +0000 Subject: [PATCH 1/7] attempt to add snap completion --- .meta/.snapcraft.yml | 6 ++++-- git-fame_completion.bash | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) 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/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 From 2481f297d15a61bc5efb0a7e6259bae29a165c86 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 10 Feb 2020 15:06:11 +0000 Subject: [PATCH 2/7] update and fix CI deploy --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e56bb5..e594884 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 @@ -56,7 +56,6 @@ jobs: - stage: deploy name: PyPI and GitHub python: 3.7 - dist: xenial install: script: - pip install .[dev] @@ -81,12 +80,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 +107,19 @@ 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 before_install: From 82ee6e80d3fe15c123ad9676b2132875c4f0364d Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 10 Feb 2020 15:10:08 +0000 Subject: [PATCH 3/7] add CI snap deploy - fixes #23 --- .travis.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.travis.yml b/.travis.yml index e594884..4a7b82a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -122,6 +122,44 @@ jobs: 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: - git fetch --tags install: From e8de2fbebb63592663afb108b18fcc5b4ba32a3e Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 10 Feb 2020 15:14:13 +0000 Subject: [PATCH 4/7] ci:fix py34 --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) 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} From a39ae841c7308ae05d61b164bbf4ed420220693b Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 10 Feb 2020 15:21:55 +0000 Subject: [PATCH 5/7] ci: fix missing deploy deps --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4a7b82a..8a56673 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,6 +56,10 @@ jobs: - stage: deploy name: PyPI and GitHub python: 3.7 + addons: + apt: + packages: + - pandoc install: script: - pip install .[dev] From 7d152580f80ffd1d40e67281220093deca3b78d1 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 10 Feb 2020 15:26:33 +0000 Subject: [PATCH 6/7] misc test tidy --- Makefile | 11 +++++------ setup.cfg | 5 +++++ 2 files changed, 10 insertions(+), 6 deletions(-) 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/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 From e8f3944a3ffe655079c9902c240adc3ec5128050 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 10 Feb 2020 15:32:00 +0000 Subject: [PATCH 7/7] ci:fix pypy --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8a56673..45ff2d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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