mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-24 02:37:05 +00:00
Amend --always option to all git describe commands (#2275)
This commit is contained in:
parent
674ce92e92
commit
81866de229
@ -912,11 +912,11 @@ def list_apt_updates(apt_update=True):
|
||||
return pkgs
|
||||
|
||||
def what_version_is_this(env):
|
||||
# This function runs `git describe --abbrev=0` on the Mail-in-a-Box installation directory.
|
||||
# This function runs `git describe --always --abbrev=0` on the Mail-in-a-Box installation directory.
|
||||
# Git may not be installed and Mail-in-a-Box may not have been cloned from github,
|
||||
# so this function may raise all sorts of exceptions.
|
||||
miab_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
tag = shell("check_output", ["/usr/bin/git", "describe", "--abbrev=0"], env={"GIT_DIR": os.path.join(miab_dir, '.git')}).strip()
|
||||
tag = shell("check_output", ["/usr/bin/git", "describe", "--always", "--abbrev=0"], env={"GIT_DIR": os.path.join(miab_dir, '.git')}).strip()
|
||||
return tag
|
||||
|
||||
def get_latest_miab_version():
|
||||
|
@ -73,7 +73,7 @@ fi
|
||||
cd $HOME/mailinabox
|
||||
|
||||
# Update it.
|
||||
if [ "$TAG" != $(git describe) ]; then
|
||||
if [ "$TAG" != $(git describe --always) ]; then
|
||||
echo Updating Mail-in-a-Box to $TAG . . .
|
||||
git fetch --depth 1 --force --prune origin tag $TAG
|
||||
if ! git checkout -q $TAG; then
|
||||
|
@ -207,6 +207,6 @@ if [ "$PRIVATE_IPV6" != "$PUBLIC_IPV6" ]; then
|
||||
echo "Private IPv6 Address: $PRIVATE_IPV6"
|
||||
fi
|
||||
if [ -f /usr/bin/git ] && [ -d .git ]; then
|
||||
echo "Mail-in-a-Box Version: " $(git describe)
|
||||
echo "Mail-in-a-Box Version: " $(git describe --always)
|
||||
fi
|
||||
echo
|
||||
|
Loading…
Reference in New Issue
Block a user