summaryrefslogtreecommitdiffstats
path: root/tools/get-version.sh
blob: 67033f8c0f5878edce26d36b6676e0b74c312198 (plain)
1
2
3
4
5
6
7
#!/bin/bash
set -e
{
    python3 -c "import setuptools_scm" || python3 -m pip install --user setuptools-scm
} 1>&2  # redirect stdout to stderr to avoid polluting the output
python3 -m setuptools_scm | \
    sed 's/Guessed Version\([^+]\+\).*/\1/'