This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit f74e248feae940609abae8828a376b42b7138a6d
Author: Daniel Gruno <[email protected]>
AuthorDate: Wed Nov 17 21:12:36 2021 +0100

    Add revision information
---
 webui/js/source/build.sh | 4 ++++
 webui/js/source/init.js  | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/webui/js/source/build.sh b/webui/js/source/build.sh
index ee2f9fc..3ead4a0 100755
--- a/webui/js/source/build.sh
+++ b/webui/js/source/build.sh
@@ -5,6 +5,7 @@ cd $(dirname "$0") || exit 1
 
 test -r build.sh || { echo "Must be run from the directory containing 
build.sh!"; exit 1; }
 
+REVISION=`git rev-parse --short HEAD`
 echo "Combining JS..."
 echo '/*
  Licensed to the Apache Software Foundation (ASF) under one or more
@@ -23,9 +24,12 @@ echo '/*
  limitations under the License.
 */
 // THIS IS AN AUTOMATICALLY COMBINED FILE. PLEASE EDIT source/*.js!!
+
+const PONYMAIL_REVISION = "'$REVISION'";
 ' > ../ponymail.js
 for f in `ls *.js`; do
     printf "\n\n/******************************************\n Fetched from 
source/${f}\n******************************************/\n\n" >> ../ponymail.js
     perl -0pe 's/\/\*.*?\*\/[\r\n]*//sm' ${f} >> ../ponymail.js
 done
 echo "Done!"
+
diff --git a/webui/js/source/init.js b/webui/js/source/init.js
index f7a8834..25f3512 100644
--- a/webui/js/source/init.js
+++ b/webui/js/source/init.js
@@ -15,7 +15,7 @@
  limitations under the License.
  */
 
-const PONYMAIL_VERSION = "1.0.1-Foal" // Current version of Pony Mail
+const PONYMAIL_VERSION = "1.0.1-Foal"; // Current version of Pony Mail
 
 let apiURL = ''; // external API URL. Usually left blank.
 
@@ -87,7 +87,7 @@ window.addEventListener('load', function() {
         }, [
             new HTML('p', {
                 class: 'muted'
-            }, "Powered by Apache Pony Mail (Foal 
v/%s)".format(PONYMAIL_VERSION))
+            }, "Powered by Apache Pony Mail (Foal v/%s 
~%s)".format(PONYMAIL_VERSION, PONYMAIL_REVISION))
         ])
     ]));
 });

Reply via email to