Skip to content

Commit

Permalink
v1.3.0 - importable __version__
Browse files Browse the repository at this point in the history
  • Loading branch information
clarketm committed Jan 15, 2019
1 parent ec7d2e8 commit 8fb19bc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version=$(shell python -c 'import sys, os; sys.path.insert(0, os.path.abspath(".")); print(__import__("pprintjson").__version__)')

.PHONY: format
format:
python -m black .
Expand Down Expand Up @@ -25,6 +27,22 @@ check:
upload-test: test clean build check
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

.PHONY: tag
tag:
ifeq (,$(shell git tag --list | grep "${version}"))
git tag "v${version}"
endif

.PHONY: release
release: tag
ifdef version
curl -XPOST \
-H "Authorization: token ${GITHUB_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
"https://api.github.com/repos/clarketm/pprintjson/releases" \
--data "{\"tag_name\": \"v${version}\",\"target_commitish\": \"master\",\"name\": \"${version}\",\"draft\": false,\"prerelease\": false}"
endif

.PHONY: upload
upload: test clean build check
twine upload dist/*
Expand Down
8 changes: 7 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "pprintjson.tex", "pprintjson Documentation", "Travis Clarke", "manual")
(
master_doc,
"pprintjson.tex",
"pprintjson Documentation",
"Travis Clarke",
"manual",
)
]


Expand Down
2 changes: 1 addition & 1 deletion pprintjson/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.2.1"
__version__ = "1.3.0"

from pprintjson.pprintjson import pprintjson, cli

Expand Down

0 comments on commit 8fb19bc

Please sign in to comment.