[BS5] add additional info to app_info.inc.php
This commit is contained in:
parent
e26d5b8ba5
commit
0e3363e61c
@ -383,15 +383,32 @@ cp -n -d data/assets/ssl-example/*.pem data/assets/ssl/
|
|||||||
|
|
||||||
# Set app_info.inc.php
|
# Set app_info.inc.php
|
||||||
mailcow_git_version=$(git describe --tags `git rev-list --tags --max-count=1`)
|
mailcow_git_version=$(git describe --tags `git rev-list --tags --max-count=1`)
|
||||||
|
mailcow_git_commit=$(git rev-parse HEAD)
|
||||||
|
mailcow_git_commit_date=$(git show -s --format=%cd --date=format:'%Y-%m-%d %H:%M')
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo '<?php' > data/web/inc/app_info.inc.php
|
echo '<?php' > data/web/inc/app_info.inc.php
|
||||||
echo ' $MAILCOW_GIT_VERSION="'$mailcow_git_version'";' >> data/web/inc/app_info.inc.php
|
echo ' $MAILCOW_GIT_VERSION="'$mailcow_git_version'";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_LAST_GIT_VERSION="";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_OWNER="mailcow";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_REPO="mailcow-dockerized";' >> data/web/inc/app_info.inc.php
|
||||||
echo ' $MAILCOW_GIT_URL="https://github.com/mailcow/mailcow-dockerized";' >> data/web/inc/app_info.inc.php
|
echo ' $MAILCOW_GIT_URL="https://github.com/mailcow/mailcow-dockerized";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_COMMIT="'$mailcow_git_commit'";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_COMMIT_DATE="'$mailcow_git_commit_date'";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_BUILD="'$BUILD'";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_UPDATEDAT='$(date +%s)';' >> data/web/inc/app_info.inc.php
|
||||||
echo '?>' >> data/web/inc/app_info.inc.php
|
echo '?>' >> data/web/inc/app_info.inc.php
|
||||||
else
|
else
|
||||||
echo '<?php' > data/web/inc/app_info.inc.php
|
echo '<?php' > data/web/inc/app_info.inc.php
|
||||||
echo ' $MAILCOW_GIT_VERSION="";' >> data/web/inc/app_info.inc.php
|
echo ' $MAILCOW_GIT_VERSION="";' >> data/web/inc/app_info.inc.php
|
||||||
echo ' $MAILCOW_GIT_URL="";' >> data/web/inc/app_info.inc.php
|
echo ' $MAILCOW_LAST_GIT_VERSION="";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_OWNER="mailcow";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_REPO="mailcow-dockerized";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_URL="https://github.com/mailcow/mailcow-dockerized";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_COMMIT="";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_COMMIT_DATE="";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_BUILD="'$BUILD'";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_UPDATEDAT='$(date +%s)';' >> data/web/inc/app_info.inc.php
|
||||||
echo '?>' >> data/web/inc/app_info.inc.php
|
echo '?>' >> data/web/inc/app_info.inc.php
|
||||||
echo -e "\e[33mCannot determine current git repository version...\e[0m"
|
echo -e "\e[33mCannot determine current git repository version...\e[0m"
|
||||||
fi
|
fi
|
||||||
|
24
update.sh
24
update.sh
@ -633,6 +633,8 @@ done
|
|||||||
|
|
||||||
# Silently fixing remote url from andryyy to mailcow
|
# Silently fixing remote url from andryyy to mailcow
|
||||||
git remote set-url origin https://github.com/mailcow/mailcow-dockerized
|
git remote set-url origin https://github.com/mailcow/mailcow-dockerized
|
||||||
|
# get git mailcow version before updating...
|
||||||
|
mailcow_last_git_version=$(git describe --tags `git rev-list --tags --max-count=1`)
|
||||||
echo -e "\e[32mCommitting current status...\e[0m"
|
echo -e "\e[32mCommitting current status...\e[0m"
|
||||||
[[ -z "$(git config user.name)" ]] && git config user.name moo
|
[[ -z "$(git config user.name)" ]] && git config user.name moo
|
||||||
[[ -z "$(git config user.email)" ]] && git config user.email moo@cow.moo
|
[[ -z "$(git config user.email)" ]] && git config user.email moo@cow.moo
|
||||||
@ -709,15 +711,35 @@ fi
|
|||||||
|
|
||||||
# Set app_info.inc.php
|
# Set app_info.inc.php
|
||||||
mailcow_git_version=$(git describe --tags `git rev-list --tags --max-count=1`)
|
mailcow_git_version=$(git describe --tags `git rev-list --tags --max-count=1`)
|
||||||
|
mailcow_git_commit=$(git rev-parse HEAD)
|
||||||
|
mailcow_git_commit_date=$(git show -s --format=%cd --date=format:'%Y-%m-%d %H:%M')
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo '<?php' > data/web/inc/app_info.inc.php
|
echo '<?php' > data/web/inc/app_info.inc.php
|
||||||
echo ' $MAILCOW_GIT_VERSION="'$mailcow_git_version'";' >> data/web/inc/app_info.inc.php
|
echo ' $MAILCOW_GIT_VERSION="'$mailcow_git_version'";' >> data/web/inc/app_info.inc.php
|
||||||
|
|
||||||
|
if [[ "$mailcow_git_version" != "$mailcow_last_git_version" ]]; then
|
||||||
|
echo ' $MAILCOW_LAST_GIT_VERSION="'$mailcow_last_git_version'";' >> data/web/inc/app_info.inc.php
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ' $MAILCOW_GIT_OWNER="mailcow";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_REPO="mailcow-dockerized";' >> data/web/inc/app_info.inc.php
|
||||||
echo ' $MAILCOW_GIT_URL="https://github.com/mailcow/mailcow-dockerized";' >> data/web/inc/app_info.inc.php
|
echo ' $MAILCOW_GIT_URL="https://github.com/mailcow/mailcow-dockerized";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_COMMIT="'$mailcow_git_commit'";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_COMMIT_DATE="'$mailcow_git_commit_date'";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_BUILD="'$BUILD'";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_UPDATEDAT='$(date +%s)';' >> data/web/inc/app_info.inc.php
|
||||||
echo '?>' >> data/web/inc/app_info.inc.php
|
echo '?>' >> data/web/inc/app_info.inc.php
|
||||||
else
|
else
|
||||||
echo '<?php' > data/web/inc/app_info.inc.php
|
echo '<?php' > data/web/inc/app_info.inc.php
|
||||||
echo ' $MAILCOW_GIT_VERSION="";' >> data/web/inc/app_info.inc.php
|
echo ' $MAILCOW_GIT_VERSION="";' >> data/web/inc/app_info.inc.php
|
||||||
echo ' $MAILCOW_GIT_URL="";' >> data/web/inc/app_info.inc.php
|
echo ' $MAILCOW_GIT_OWNER="mailcow";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_REPO="mailcow-dockerized";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_URL="https://github.com/mailcow/mailcow-dockerized";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_COMMIT="";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_GIT_COMMIT_DATE="";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_BUILD="'$BUILD'";' >> data/web/inc/app_info.inc.php
|
||||||
|
echo ' $MAILCOW_UPDATEDAT='$(date +%s)';' >> data/web/inc/app_info.inc.php
|
||||||
echo '?>' >> data/web/inc/app_info.inc.php
|
echo '?>' >> data/web/inc/app_info.inc.php
|
||||||
echo -e "\e[33mCannot determine current git repository version...\e[0m"
|
echo -e "\e[33mCannot determine current git repository version...\e[0m"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user