BSK_BUSTING valorization during installation (hash or brisk version if hash not found)
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Sat, 18 Apr 2020 08:48:52 +0000 (10:48 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Sat, 18 Apr 2020 08:48:52 +0000 (10:48 +0200)
INSTALL.sh
web/Obj/brisk.phh

index 0266f47..dce6e83 100755 (executable)
@@ -367,6 +367,16 @@ if [ "$web_only" = "FALSE" ]; then
     mkdir -p "${legal_path}"
     chmod 777 "${legal_path}"
 fi
     mkdir -p "${legal_path}"
     chmod 777 "${legal_path}"
 fi
+
+bsk_busting="$(git rev-parse --short HEAD 2>/dev/null|| true)"
+if [ "$bsk_busting" = "" ]; then
+    bsk_busting=$(grep '^\$G_brisk_version'  web/Obj/brisk.phh | sed 's/^[^"'"'"']*["'"'"']/v/g;s/["'"'"'].*//g')
+fi
+if [ "$bsk_busting" = "" ]; then
+    echo "Retreiving bsk_busting failed"
+    exit 1
+fi
+
 install -d ${web_path}__
 for i in $(find web -type d | grep '/' | sed 's/^....//g'); do
     install -d ${web_path}__/$i
 install -d ${web_path}__
 for i in $(find web -type d | grep '/' | sed 's/^....//g'); do
     install -d ${web_path}__/$i
@@ -422,6 +432,7 @@ s@define *( *'TABLES_CERT_N',[^)]*)@define('TABLES_CERT_N', $tables_cert_n)@g;
 s@define *( *'BRISK_DEBUG',[^)]*)@define('BRISK_DEBUG', $brisk_debug)@g;
 s@define *( *'LEGAL_PATH',[^)]*)@define('LEGAL_PATH', \"$legal_path\")@g;
 s@define *( *'PROXY_PATH',[^)]*)@define('PROXY_PATH', \"$proxy_path\")@g;
 s@define *( *'BRISK_DEBUG',[^)]*)@define('BRISK_DEBUG', $brisk_debug)@g;
 s@define *( *'LEGAL_PATH',[^)]*)@define('LEGAL_PATH', \"$legal_path\")@g;
 s@define *( *'PROXY_PATH',[^)]*)@define('PROXY_PATH', \"$proxy_path\")@g;
+s@define *( *'BSK_BUSTING',[^)]*)@define('BSK_BUSTING', \"$bsk_busting\")@g;
 s@define *( *'BRISK_CONF',[^)]*)@define('BRISK_CONF', \"$brisk_conf\")@g;" ${web_path}__/Obj/brisk.phh
 
 sed -i "s@define *( *'BRISK_AUTH_CONF',[^)]*)@define('BRISK_AUTH_CONF', \"$brisk_auth_conf\")@g" ${web_path}__/Obj/auth.phh
 s@define *( *'BRISK_CONF',[^)]*)@define('BRISK_CONF', \"$brisk_conf\")@g;" ${web_path}__/Obj/brisk.phh
 
 sed -i "s@define *( *'BRISK_AUTH_CONF',[^)]*)@define('BRISK_AUTH_CONF', \"$brisk_auth_conf\")@g" ${web_path}__/Obj/auth.phh
index 335929b..325eb9f 100644 (file)
@@ -89,6 +89,8 @@ define('BRISK_SINGLE_DEBUG',0);
 define('BRISK_SINGLE_SESS', "");
 define('DEBUGGING', "no-debugging");
 
 define('BRISK_SINGLE_SESS', "");
 define('DEBUGGING', "no-debugging");
 
+define('BSK_BUSTING', "dev");
+
 require_once("$DOCUMENT_ROOT/Etc/".BRISK_CONF);
 require_once("${G_base}Obj/ipclass.phh");
 
 require_once("$DOCUMENT_ROOT/Etc/".BRISK_CONF);
 require_once("${G_base}Obj/ipclass.phh");