77#
88# -------------------------------------------------------------
99function warn {
10- GREEN=' \033[0;32m'
11- NORMAL=' \033[0m'
12- echo -e " ${GREEN} $1 ${NORMAL} "
10+ GREEN=' \033[0;32m'
11+ NORMAL=' \033[0m'
12+ echo -e " ${GREEN} $1 ${NORMAL} "
1313}
1414
1515function get_value {
16- # get the value from the config file (requires the Python toml package)
17- toml get --toml-path pyproject.toml $1
16+ # get the value from the config file (requires the Python toml package)
17+ toml get --toml-path pyproject.toml $1
1818}
1919
2020# Clean the subdirs, for safety and to guarantee integrity
2828
2929# get the project inform
3030package_name=$( get_value project.name)
31- package_version=v$( get_value project.version) # add a 'v' in front (git convention)
31+ package_version=v$( get_value project.version) # add a 'v' in front (git convention)
3232
3333# update Pypi
3434warn " Rebuilding $package_name ..."
3535rm -rf build dist * .egg-info # necessary to guarantee integrity
36- python3 -m build
37- if twine upload dist/* ; then
38- git push # just in case
39- warn " ... create tag $package_version , and push to remote git repo..."
40- git tag $package_version
41- git push --tags
42- warn " Done ($package_version )!"
36+ PYTHON=$( which python3.11)
37+ $PYTHON -m build
38+ if twine upload dist/* ; then
39+ git push # just in case
40+ warn " ... create tag $package_version , and push to remote git repo..."
41+ git tag $package_version
42+ git push --tags
43+ warn " Done ($package_version )!"
4344else
44- warn " Failed ($package_version )!"
45- exit 1
46- fi
45+ warn " Failed ($package_version )!"
46+ exit 1
47+ fi
48+
0 commit comments