Skip to content

Commit

Permalink
Versioning is a pain
Browse files Browse the repository at this point in the history
  • Loading branch information
Samreay committed Oct 9, 2023
1 parent cdd5b85 commit a58f851
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.PHONY: tests docs build
VERSION := $(shell git for-each-ref refs/tags --format='%(refname:short)' | grep -E "^v?[0-9]+\..*" | tail -n1)

install:
pip install -U pip poetry -q
Expand All @@ -17,16 +18,16 @@ serve:
poetry run mkdocs serve --clean

docs:
poetry run mkdocs build
poetry run poetry version $(VERSION) && mkdocs build

pushdocs:
poetry run mkdocs gh-deploy --force
poetry run poetry version $(VERSION) && mkdocs gh-deploy --force

build:
poetry version $$(git describe --tags --abbrev=0) && poetry publish --build --dry-run
rm -rf dist; poetry version $(VERSION) && poetry publish --build --dry-run

publish:
poetry config pypi-token.pypi $PYPI_TOKEN && poetry version $$(git describe --tags --abbrev=0) && poetry publish --build
rm -rf dist; poetry config pypi-token.pypi $PYPI_TOKEN && poetry version $(VERSION) && poetry publish --build -y

tests: test

Expand Down
12 changes: 9 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
site_name: ChainConsumer
site_url: https://samreay.github.io/chainconsumer/
site_author: Samuel Hinton

edit_uri: ""
repo_name: samreay/chainconsumer
repo_url: https://github.com/samreay/chainconsumer

theme:
name: material
icon:
Expand All @@ -25,10 +32,9 @@ theme:
toggle:
icon: material/weather-night
name: Switch to dark mode
repo_name: chainconsumer
repo_url: https://github.com/samreay/chainconsumer

plugins:
# autorefs: {}
autorefs: {}
mkdocstrings:
handlers:
python:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "ChainConsumer: Consumer your MCMC chains"
name = "ChainConsumer"
packages = [{include = "chainconsumer", from = "src"}]
readme = "README.md"
version = "0.0.0"
version = "v0.34.0"

[tool.poetry-version-plugin]
source = "git-tag"
Expand Down

0 comments on commit a58f851

Please sign in to comment.