-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Jusfile and script for releasing purpose
- Loading branch information
Guillaume Gauvrit
committed
Oct 15, 2024
1 parent
7fa0869
commit 16661dc
Showing
2 changed files
with
75 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package := 'zipkin' | ||
default_test_suite := 'zipkin/tests' | ||
|
||
install: | ||
poetry install --with dev | ||
|
||
doc: | ||
cd docs && poetry run make html | ||
xdg-open docs/build/html/index.html | ||
|
||
cleandoc: | ||
cd docs && poetry run make clean | ||
|
||
test: unittest | ||
|
||
lf: | ||
poetry run pytest -sxvvv --lf | ||
|
||
unittest test_suite=default_test_suite: | ||
poetry run pytest -sxv {{test_suite}} | ||
|
||
lint: | ||
poetry run flake8 | ||
|
||
mypy: | ||
poetry run mypy src/ | ||
|
||
black: | ||
poetry run isort . | ||
poetry run black . | ||
|
||
fmt: black | ||
|
||
gh-pages: | ||
poetry export --with doc -f requirements.txt -o docs/requirements.txt --without-hashes | ||
|
||
cov test_suite=default_test_suite: | ||
rm -f .coverage | ||
rm -rf htmlcov | ||
poetry run pytest --cov-report=html --cov={{package}} {{test_suite}} | ||
xdg-open htmlcov/index.html | ||
|
||
release major_minor_patch: test && changelog | ||
poetry version {{major_minor_patch}} | ||
poetry install | ||
|
||
changelog: | ||
poetry run python scripts/write_changelog.py | ||
cat CHANGES.rst >> CHANGES.rst.new | ||
rm CHANGES.rst | ||
mv CHANGES.rst.new CHANGES.rst | ||
$EDITOR CHANGES.rst | ||
|
||
publish: | ||
git commit -am "Release $(poetry version -s --no-ansi)" | ||
poetry build | ||
poetry publish | ||
git push | ||
git tag "$(poetry version -s --no-ansi)" | ||
git push origin "$(poetry version -s --no-ansi)" |
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,15 @@ | ||
#!/usr/bin/env python3 | ||
import datetime | ||
|
||
import zipkin | ||
|
||
header = ( | ||
f"{zipkin.__version__} - " | ||
f"Released on {datetime.datetime.now().date().isoformat()}" | ||
) | ||
with open("CHANGES.rst.new", "w") as changelog: | ||
changelog.write(header) | ||
changelog.write("\n") | ||
changelog.write("-" * len(header)) | ||
changelog.write("\n") | ||
changelog.write("* please write here \n\n") |