2012-11-22 05:44:12 +00:00
|
|
|
VERSION = $(shell grep -oE "[0-9]+\.[0-9]+\.[0-9]+" bin/autojump)
|
|
|
|
TAGNAME = release-v$(VERSION)
|
2012-04-17 23:09:39 +00:00
|
|
|
|
2016-05-04 06:10:57 +00:00
|
|
|
.PHONY: clean docs install uninstall pre-commit lint tar test
|
2012-04-17 23:09:39 +00:00
|
|
|
|
|
|
|
install:
|
2014-06-23 15:05:14 +00:00
|
|
|
./install.py
|
2012-04-17 23:09:39 +00:00
|
|
|
|
2012-04-17 23:40:53 +00:00
|
|
|
uninstall:
|
2014-06-23 15:05:14 +00:00
|
|
|
./uninstall.py
|
2012-04-17 23:40:53 +00:00
|
|
|
|
2012-04-17 23:09:39 +00:00
|
|
|
docs:
|
2012-04-18 06:38:49 +00:00
|
|
|
pandoc -s -w man docs/manpage_header.md docs/header.md docs/body.md -o docs/autojump.1
|
2014-01-07 18:32:35 +00:00
|
|
|
pandoc -s -w markdown docs/header.md docs/install.md docs/body.md -o README.md
|
2012-04-17 23:09:39 +00:00
|
|
|
|
2017-06-01 05:50:32 +00:00
|
|
|
.PHONY: lint
|
|
|
|
lint: pre-commit
|
|
|
|
@tox -e pre-commit -- run --all-files
|
|
|
|
|
2016-04-29 06:25:07 +00:00
|
|
|
pre-commit:
|
|
|
|
@tox -e pre-commit -- install -f --install-hooks
|
2013-12-28 13:13:47 +00:00
|
|
|
|
2013-11-24 22:47:14 +00:00
|
|
|
release: docs
|
2012-04-17 23:09:39 +00:00
|
|
|
# Check for tag existence
|
|
|
|
# git describe release-$(VERSION) 2>&1 >/dev/null || exit 1
|
|
|
|
|
2012-04-17 23:40:53 +00:00
|
|
|
# Modify autojump with version
|
|
|
|
./tools/git-version.sh $(TAGNAME)
|
2012-04-17 23:09:39 +00:00
|
|
|
|
|
|
|
# Commit the version change
|
2012-04-17 23:40:53 +00:00
|
|
|
git commit -m "version numbering" ./bin/autojump
|
2012-04-17 23:09:39 +00:00
|
|
|
|
|
|
|
# Create tag
|
|
|
|
git tag -a $(TAGNAME)
|
|
|
|
|
2012-04-17 23:40:53 +00:00
|
|
|
# Create tagged archive
|
2012-11-22 05:44:12 +00:00
|
|
|
git archive --format=tar --prefix autojump_v$(VERSION)/ $(TAGNAME) | gzip > autojump_v$(VERSION).tar.gz
|
|
|
|
sha1sum autojump_v$(VERSION).tar.gz
|
2012-05-13 02:31:58 +00:00
|
|
|
|
2012-10-31 03:30:45 +00:00
|
|
|
tar:
|
|
|
|
# Create tagged archive
|
2012-11-22 05:44:12 +00:00
|
|
|
git archive --format=tar --prefix autojump_v$(VERSION)/ $(TAGNAME) | gzip > autojump_v$(VERSION).tar.gz
|
|
|
|
sha1sum autojump_v$(VERSION).tar.gz
|
2013-12-31 22:34:35 +00:00
|
|
|
|
2016-04-29 06:29:55 +00:00
|
|
|
test: pre-commit
|
2016-05-04 06:24:29 +00:00
|
|
|
@tox
|
2016-04-29 05:38:00 +00:00
|
|
|
|
2016-06-23 01:08:51 +00:00
|
|
|
test-xfail: pre-commit
|
|
|
|
@tox -- --runxfail
|
|
|
|
|
2016-04-29 06:25:07 +00:00
|
|
|
test-fast: pre-commit
|
2016-05-04 06:24:29 +00:00
|
|
|
@tox -e py27
|
2016-05-04 06:10:57 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
@find . -type f -iname '*.py[co]' -delete
|
|
|
|
@find . -type d -iname '__pycache__' -delete
|
|
|
|
@rm -fr .tox
|