#!/usr/bin/env bash

[[ ! -e alienpy/alien.py ]] && { echo "alien.py was not found"; exit 1; }

VER=$(python3 -c 'from alienpy.version import *;print(ALIENPY_VERSION_STR)') # '
[[ -z ${VER} ]] && { echo "Something is wrong, could not get the version number"; exit 1; }

#tag=$(git describe --tags --abbrev=0 --exact-match)

mkdir -p dist
#rm -rf dist/*
python3 -m build --sdist --wheel

echo "# Now, for pypi publishing one can do either:
twine upload --verbose dist/*
# or for testing pypi
twine upload --repository testpypi --verbose dist/*"

