Closed ASLeonard closed 1 month ago
Something like
PGGB_RELEASE_VERSION="v0.6.0"
SCRIPT_DIR=$( cd -- "$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}" )" )" &> /dev/null && pwd )
GIT_VERSION=$(cd "$SCRIPT_DIR"; git describe --always --tags --long 2> /dev/null || echo $PGGB_RELEASE_VERSION)
seems to work for both git/tar versions
I like that, better than nothing. Thank you for the commits and the tests!
There is no record of what pggb version was used in the log files, which is probably useful information to check in case tool are out of sync.
On a side note, the
pggb --version
command only seems to work if you have the git version rather than a release tar. That gives an error likeMaybe there should be a release-pinned version as a variable to fall back on if the git version is not defined.