Skip to content

Commit 8fb19bc

Browse files
committed
v1.3.0 - importable __version__
1 parent ec7d2e8 commit 8fb19bc

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version=$(shell python -c 'import sys, os; sys.path.insert(0, os.path.abspath(".")); print(__import__("pprintjson").__version__)')
2+
13
.PHONY: format
24
format:
35
python -m black .
@@ -25,6 +27,22 @@ check:
2527
upload-test: test clean build check
2628
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
2729

30+
.PHONY: tag
31+
tag:
32+
ifeq (,$(shell git tag --list | grep "${version}"))
33+
git tag "v${version}"
34+
endif
35+
36+
.PHONY: release
37+
release: tag
38+
ifdef version
39+
curl -XPOST \
40+
-H "Authorization: token ${GITHUB_ACCESS_TOKEN}" \
41+
-H "Content-Type: application/json" \
42+
"https://api.github.com/repos/clarketm/pprintjson/releases" \
43+
--data "{\"tag_name\": \"v${version}\",\"target_commitish\": \"master\",\"name\": \"${version}\",\"draft\": false,\"prerelease\": false}"
44+
endif
45+
2846
.PHONY: upload
2947
upload: test clean build check
3048
twine upload dist/*

docs/source/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,13 @@
154154
# (source start file, target name, title,
155155
# author, documentclass [howto, manual, or own class]).
156156
latex_documents = [
157-
(master_doc, "pprintjson.tex", "pprintjson Documentation", "Travis Clarke", "manual")
157+
(
158+
master_doc,
159+
"pprintjson.tex",
160+
"pprintjson Documentation",
161+
"Travis Clarke",
162+
"manual",
163+
)
158164
]
159165

160166

pprintjson/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.2.1"
1+
__version__ = "1.3.0"
22

33
from pprintjson.pprintjson import pprintjson, cli
44

0 commit comments

Comments
 (0)