Merge pull request 'Show git digest in abra version if we're running a development version' (#103) from digest-version into main
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: https://git.autonomic.zone/coop-cloud/abra/pulls/103
This commit is contained in:
decentral1se 2021-03-17 12:48:45 +01:00
commit 293d3ff558
2 changed files with 7 additions and 2 deletions

View File

@ -17,6 +17,7 @@
- Extend version handling logic to support all underlying services ([#90](https://git.autonomic.zone/coop-cloud/abra/issues/90)) - 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)) - 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 `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) # abra 0.5.0 (2021-03-01)

8
abra
View File

@ -1712,11 +1712,15 @@ sub_upgrade() {
help_version (){ help_version (){
echo "abra [options] version echo "abra [options] version
Show the installed version of abra (currently $ABRA_VERSION)." Show the installed version of abra."
} }
sub_version() { 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 ###### .. help