From 8b4141670c997a0d5a9b7311b7687e844584f927 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Tue, 16 Mar 2021 12:54:42 +0200 Subject: [PATCH 1/2] Include git digest in dev `version` output Re: #100 --- abra | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/abra b/abra index dc30c43..89a981e 100755 --- a/abra +++ b/abra @@ -1712,11 +1712,15 @@ sub_upgrade() { help_version (){ echo "abra [options] version -Show the installed version of abra (currently $ABRA_VERSION)." +Show the installed version of abra." } sub_version() { - echo "$ABRA_VERSION" + if [ -L "$0" ] && [ -e "$0" ]; then + ABRA_SRC=$(readlink "$0") + ABRA_DIGEST=$(cd "${ABRA_SRC%/*}" && git rev-parse --short HEAD) + fi + echo "$ABRA_VERSION${ABRA_DIGEST:+-}${ABRA_DIGEST}" } ###### .. help From c00319ab0102963942b63f5b434d176e88765cb1 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Tue, 16 Mar 2021 12:55:47 +0200 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d4271a..8f619b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Extend version handling logic to support all underlying services ([#90](https://git.autonomic.zone/coop-cloud/abra/issues/90)) - Fix development installation script symlink issue ([#98](https://git.autonomic.zone/coop-cloud/abra/issues/98)) - Add `app-version.sh` script to help packagers version apps ([28618bd](https://git.autonomic.zone/coop-cloud/abra/commit/28618bd)) +- Add git digest to `abra version` output ([8b41416](https://git.autonomic.zone/coop-cloud/abra/commit/8b41416)) # abra 0.5.0 (2021-03-01)