Skip to content

Commit

Permalink
Merge pull request #479 from nschloe/meshio
Browse files Browse the repository at this point in the history
meshio
  • Loading branch information
nschloe committed Aug 31, 2021
2 parents a95a23c + f905229 commit e40e57b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
22 changes: 9 additions & 13 deletions justfile
@@ -1,24 +1,24 @@
VERSION=$(shell python3 -c "from configparser import ConfigParser; p = ConfigParser(); p.read('setup.cfg'); print(p['metadata']['version'])")
version := `python3 -c "from configparser import ConfigParser; p = ConfigParser(); p.read('setup.cfg'); print(p['metadata']['version'])"`
name := `python3 -c "from configparser import ConfigParser; p = ConfigParser(); p.read('setup.cfg'); print(p['metadata']['name'])"`


default:
@echo "\"make publish\"?"
@echo "\"just publish\"?"

tag:
# Make sure we're on the main branch
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
# Always create a github "release" right after tagging so it appears on zenodo
curl -H "Authorization: token `cat $(HOME)/.github-access-token`" -d '{"tag_name": "v$(VERSION)"}' https://api.github.com/repos/nschloe/pygmsh/releases
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
curl -H "Authorization: token `cat ~/.github-access-token`" -d '{"tag_name": "{{version}}"}' https://api.github.com/repos/nschloe/{{name}}/releases

upload: clean
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
# https://stackoverflow.com/a/58756491/353337
python3 -m build --sdist --wheel .
twine upload dist/*

publish: tag upload

clean:
@find . | grep -E "(__pycache__|\.pyc|\.pyo$\)" | xargs rm -rf
@find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
@rm -rf src/*.egg-info/ build/ dist/ .tox/

format:
Expand All @@ -27,9 +27,5 @@ format:
blacken-docs README.md

lint:
flake8 .
isort -c .
black --check .
doc:
sphinx-build -M html doc/ build/
flake8 .
4 changes: 2 additions & 2 deletions setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = pygmsh
version = 7.1.11
version = 7.1.12
author = Nico Schlömer
email = nico.schloemer@gmail.com
description = Python frontend for Gmsh
Expand Down Expand Up @@ -40,7 +40,7 @@ package_dir =
=src
packages = find:
install_requires =
meshio >= 4.3.2, <5
meshio >= 4.3.2, <6
numpy >= 1.9
python_requires = >=3.6
setup_requires =
Expand Down

0 comments on commit e40e57b

Please sign in to comment.