-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·35 lines (25 loc) · 805 Bytes
/
release.sh
File metadata and controls
executable file
·35 lines (25 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#/bin/bash
set -e
update_version_type=$1
# update version
poetry version $update_version_type
version=$(poetry version --short)
line_number=$(grep -n "__version__" src/sparkml_base_classes/__init__.py | cut -d: -f1)
sed -i '' "${line_number}s/.*/__version__ = \"${version}\"/" src/sparkml_base_classes/__init__.py
# check versions match in pyproject.toml and chunkot/__init__.py
poetry run pytest tests/package_version_test.py
# add, commit and tag changes of the versions
git add src/sparkml_base_classes/__init__.py pyproject.toml
git commit -m "Release ${version}"
git tag -a $version -m "My release ${version}"
# push changes
git push origin master
git push origin --tags
# check
poetry check
# build
poetry build --no-cache
# check
poetry run twine check dist/*
# publish
poetry publish -v