From 468ced19617c43a41715025c93b7195c0cbc947f Mon Sep 17 00:00:00 2001 From: AndreaGuarracino Date: Fri, 13 Sep 2024 14:59:31 -0500 Subject: [PATCH] add a fall back version --- partition-before-pggb | 3 ++- pggb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/partition-before-pggb b/partition-before-pggb index 605ce3c..80887bf 100755 --- a/partition-before-pggb +++ b/partition-before-pggb @@ -171,8 +171,9 @@ while true ; do esac done +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 ) +GIT_VERSION=$( cd "$SCRIPT_DIR"; git describe --always --tags --long 2> /dev/null || echo $PGGB_RELEASE_VERSION ) if [ "$show_version" == true ]; then echo "pggb $GIT_VERSION" diff --git a/pggb b/pggb index 162b798..5137231 100755 --- a/pggb +++ b/pggb @@ -171,8 +171,9 @@ while true ; do esac done +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 ) +GIT_VERSION=$( cd "$SCRIPT_DIR"; git describe --always --tags --long 2> /dev/null || echo $PGGB_RELEASE_VERSION ) if [ "$show_version" == true ]; then echo "pggb $GIT_VERSION"