diff --git a/repo-utils/Makefile b/repo-utils/Makefile deleted file mode 100644 index 0b3d6e6..0000000 --- a/repo-utils/Makefile +++ /dev/null @@ -1,28 +0,0 @@ - -HELP_FUN = \ - %help; while(<>){push@{$$help{$$2//'options'}},[$$1,$$3] \ - if/^([\w-_]+)\s*:.*\#\#(?:@(\w+))?\s(.*)$$/}; \ - print"$$_:\n", map" $$_->[0]".(" "x(20-length($$_->[0])))."$$_->[1]\n",\ - @{$$help{$$_}},"\n" for keys %help; \ - -help: ##@Miscellaneous Show this help - @echo -e "Usage: make [target] ...\n" - @perl -e '$(HELP_FUN)' $(MAKEFILE_LIST) - - -wheel: ##@PyPI build local wheel - bash wheel.sh - -wheel-push: ##@PyPI push local wheel - bash wheel-push.sh - -pypi-package: wheel wheel-push ##@PyPI wheel build + push - -tag: ##@Repo create and push tag from version.txt - bash tag.sh - -pypi-release: ##@Repo perform several actions for PyPI package release and repo update - bash increase-version.sh - make pypi-package - bash commit-version.sh - make tag diff --git a/repo-utils/commit-version.sh b/repo-utils/commit-version.sh deleted file mode 100644 index e8b1d54..0000000 --- a/repo-utils/commit-version.sh +++ /dev/null @@ -1,11 +0,0 @@ -# -# performs minimal commit and push with default version message -# -# -# - -cd ../ - -git add . -git commit -m "update to $(cat version.txt)" -git push diff --git a/repo-utils/get-python.sh b/repo-utils/get-python.sh deleted file mode 100644 index a5697ec..0000000 --- a/repo-utils/get-python.sh +++ /dev/null @@ -1,27 +0,0 @@ -# -# seeks for the Python interpreter in the parent directory -# -# exites with error if cannot found -# - -cd ../ - -PYTHON="" -for python in "venv/bin/python" ".venv/bin/python" "python" -do - if [ -x "$(command -v ${python})" ] - then - echo -e "Use python: $(which $python)" - PYTHON=${python} - break - else - echo "Not found python from ${python}" - fi -done - -if [ -z $PYTHON ] -then - echo "Python interpreter not found!" - exit 1 -fi - diff --git a/repo-utils/increase-version.sh b/repo-utils/increase-version.sh deleted file mode 100644 index b53dade..0000000 --- a/repo-utils/increase-version.sh +++ /dev/null @@ -1,19 +0,0 @@ -# -# increases the minor version in the version.txt file -# - - -# https://stackoverflow.com/a/10638555/13119067 - -set -e - -cd ../ - -v="$(cat version.txt)" -pre="${v%.*}" -post="${v##*.}" - -(( post += 1 )) - -echo -n "$pre.$post" > version.txt - diff --git a/repo-utils/tag.sh b/repo-utils/tag.sh deleted file mode 100644 index a8debef..0000000 --- a/repo-utils/tag.sh +++ /dev/null @@ -1,11 +0,0 @@ -# -# tags current commit and pushes it to repo -# - -set -e - -cd ../ - -git tag "$(cat version.txt)" -git push --tags - diff --git a/repo-utils/wheel-push.sh b/repo-utils/wheel-push.sh deleted file mode 100644 index a498bee..0000000 --- a/repo-utils/wheel-push.sh +++ /dev/null @@ -1,33 +0,0 @@ -# -# pushes to pypi with credentials reading -# -# credentials are file usually called pypi.sh (in the parent directory) with next variables: -# PYPI_USERNAME=__token__ -# PYPI_PASSWORD=pypi-AgEIcHlwaS5vcmcCJG... -# -# usage: -# bash wheel-push pypi-file(=../pypi.sh) -# - -set -e - -pypi_creds=${1:-../pypi.sh} - -source get-python.sh - -if [ -f "${pypy_creds}" ] -then - source ${pypi_creds} -fi - -U=${PYPI_USERNAME} -P=${PYPI_PASSWORD} - -if [ -n "$U" ] && [ -n "$P" ] -then - $PYTHON -m twine upload -u $U -p $P dist/* --skip-existing -else - echo "credentials not found" - $PYTHON -m twine upload dist/* --skip-existing -fi - diff --git a/repo-utils/wheel.sh b/repo-utils/wheel.sh deleted file mode 100644 index e97b275..0000000 --- a/repo-utils/wheel.sh +++ /dev/null @@ -1,14 +0,0 @@ - -set -e - -source get-python.sh - -if [ ! -f setup.py ] -then - echo "setup.py not found! exiting" - exit 1 -fi - -$PYTHON setup.py develop -$PYTHON setup.py sdist -$PYTHON setup.py bdist_wheel