mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Add 'make lint' target.
This commit is contained in:
parent
b4e8474769
commit
4f84e755f5
12
Makefile
12
Makefile
@ -1,14 +1,15 @@
|
|||||||
VERSION = $(shell grep -oE "[0-9]+\.[0-9]+\.[0-9]+" bin/autojump)
|
VERSION = $(shell grep -oE "[0-9]+\.[0-9]+\.[0-9]+" bin/autojump)
|
||||||
TAGNAME = release-v$(VERSION)
|
TAGNAME = release-v$(VERSION)
|
||||||
|
|
||||||
.PHONY: clean docs install uninstall pre-commit lint tar test
|
.PHONY: install
|
||||||
|
|
||||||
install:
|
install:
|
||||||
./install.py
|
./install.py
|
||||||
|
|
||||||
|
.PHONY: uninstall
|
||||||
uninstall:
|
uninstall:
|
||||||
./uninstall.py
|
./uninstall.py
|
||||||
|
|
||||||
|
.PHONY: docs
|
||||||
docs:
|
docs:
|
||||||
pandoc -s -w man docs/manpage_header.md docs/header.md docs/body.md -o docs/autojump.1
|
pandoc -s -w man docs/manpage_header.md docs/header.md docs/body.md -o docs/autojump.1
|
||||||
pandoc -s -w markdown docs/header.md docs/install.md docs/body.md -o README.md
|
pandoc -s -w markdown docs/header.md docs/install.md docs/body.md -o README.md
|
||||||
@ -17,9 +18,11 @@ docs:
|
|||||||
lint: pre-commit
|
lint: pre-commit
|
||||||
@tox -e pre-commit -- run --all-files
|
@tox -e pre-commit -- run --all-files
|
||||||
|
|
||||||
|
.PHONY: pre-commit
|
||||||
pre-commit:
|
pre-commit:
|
||||||
@tox -e pre-commit -- install -f --install-hooks
|
@tox -e pre-commit -- install -f --install-hooks
|
||||||
|
|
||||||
|
.PHONY: release
|
||||||
release: docs
|
release: docs
|
||||||
# Check for tag existence
|
# Check for tag existence
|
||||||
# git describe release-$(VERSION) 2>&1 >/dev/null || exit 1
|
# git describe release-$(VERSION) 2>&1 >/dev/null || exit 1
|
||||||
@ -37,20 +40,25 @@ release: docs
|
|||||||
git archive --format=tar --prefix autojump_v$(VERSION)/ $(TAGNAME) | gzip > autojump_v$(VERSION).tar.gz
|
git archive --format=tar --prefix autojump_v$(VERSION)/ $(TAGNAME) | gzip > autojump_v$(VERSION).tar.gz
|
||||||
sha1sum autojump_v$(VERSION).tar.gz
|
sha1sum autojump_v$(VERSION).tar.gz
|
||||||
|
|
||||||
|
.PHONY: tar
|
||||||
tar:
|
tar:
|
||||||
# Create tagged archive
|
# Create tagged archive
|
||||||
git archive --format=tar --prefix autojump_v$(VERSION)/ $(TAGNAME) | gzip > autojump_v$(VERSION).tar.gz
|
git archive --format=tar --prefix autojump_v$(VERSION)/ $(TAGNAME) | gzip > autojump_v$(VERSION).tar.gz
|
||||||
sha1sum autojump_v$(VERSION).tar.gz
|
sha1sum autojump_v$(VERSION).tar.gz
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
test: pre-commit
|
test: pre-commit
|
||||||
@tox
|
@tox
|
||||||
|
|
||||||
|
.PHONY: test-xfail
|
||||||
test-xfail: pre-commit
|
test-xfail: pre-commit
|
||||||
@tox -- --runxfail
|
@tox -- --runxfail
|
||||||
|
|
||||||
|
.PHONY: test-fast
|
||||||
test-fast: pre-commit
|
test-fast: pre-commit
|
||||||
@tox -e py27
|
@tox -e py27
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@find . -type f -iname '*.py[co]' -delete
|
@find . -type f -iname '*.py[co]' -delete
|
||||||
@find . -type d -iname '__pycache__' -delete
|
@find . -type d -iname '__pycache__' -delete
|
||||||
|
Loading…
Reference in New Issue
Block a user