-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from nschloe/justfile
make -> just
- Loading branch information
Showing
2 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
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 "\"just publish\"?" | ||
|
||
tag: | ||
@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 [ "$(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 | ||
@rm -rf src/*.egg-info/ build/ dist/ .tox/ | ||
|
||
dep: | ||
npm install | ||
cp node_modules/bootstrap/dist/css/bootstrap.min.css tuna/web/static/ | ||
cp node_modules/d3/dist/d3.min.js tuna/web/static/ | ||
|
||
update: | ||
npm update | ||
npm update --save-dev | ||
npm outdated | ||
|
||
lint: | ||
flake8 . | ||
black --check . | ||
# blacken-docs README.md | ||
npm run prettier | ||
npm run htmlhint | ||
|
||
format: | ||
isort . | ||
black . | ||
prettier --write tuna/web/static/icicle.js |