Skip to content

Commit

Permalink
Merge pull request #408 from ASLeonard/log-pggb-version
Browse files Browse the repository at this point in the history
Add pggb version to its own log
  • Loading branch information
AndreaGuarracino committed Sep 13, 2024
2 parents 09837a4 + fb33b29 commit dcf87b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions partition-before-pggb
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ while true ; do
esac
done

SCRIPT_DIR=$( cd -- "$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}" )" )" &> /dev/null && pwd )
GIT_VERSION=$( cd "$SCRIPT_DIR"; git describe --always --tags --long )

if [ "$show_version" == true ]; then
SCRIPT_DIR=$( cd -- "$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}" )" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR"
GIT_VERSION=$(git describe --always --tags --long)
echo "pggb $GIT_VERSION"
cd - &> /dev/null
exit
Expand Down Expand Up @@ -495,6 +495,8 @@ general:
compress: $compress
threads: $threads
poa_threads: $poa_threads
pggb:
version: $GIT_VERSION
$mapper:
version: $mapper_version
segment-length: $segment_length
Expand Down
8 changes: 5 additions & 3 deletions pggb
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ while true ; do
esac
done

SCRIPT_DIR=$( cd -- "$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}" )" )" &> /dev/null && pwd )
GIT_VERSION=$( cd "$SCRIPT_DIR"; git describe --always --tags --long )

if [ "$show_version" == true ]; then
SCRIPT_DIR=$( cd -- "$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}" )" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR"
GIT_VERSION=$(git describe --always --tags --long)
echo "pggb $GIT_VERSION"
cd - &> /dev/null
exit
Expand Down Expand Up @@ -495,6 +495,8 @@ general:
compress: $compress
threads: $threads
poa_threads: $poa_threads
pggb:
version: $GIT_VERSION
$mapper:
version: $mapper_version
segment-length: $segment_length
Expand Down

0 comments on commit dcf87b4

Please sign in to comment.