Simple tool for quickly grabbing the version from a pyproject.toml or package.json file
Running without any arguments will look for project files in the current directory and will parse the first one it finds.
Running with an argument will use that as the filename to try to parse.
$ projectversionparser ./pyproject.toml
PACKAGE_VERSION=0.1.0
PACKAGE_NAME=my-package-nameTo set the output as env variables, use either:
$ source <(projectversionparser)or
$ projectversionparser > envfile
$ source ./envfile