diff --git a/bin/confcheck.php b/bin/confcheck.php index 0d30b772..aa0c4d8c 100755 --- a/bin/confcheck.php +++ b/bin/confcheck.php @@ -366,11 +366,6 @@ echo $output; } - //Log the upgrade - if ($action == "upgrade") { - add_admin_log_item("System was upgraded from version $version", "System Upgrade"); - } - echo "\n"; //Remove the lock file diff --git a/bin/getversion.php b/bin/getversion.php index 54a5a1fc..d14474db 100644 --- a/bin/getversion.php +++ b/bin/getversion.php @@ -5,14 +5,22 @@ if (($pid = cronHelper::lock()) !== FALSE) { $action = ""; + $rawver = FALSE; if (in_array("checknew", $argv)) { $action = "checknew"; } + if (in_array("raw", $argv)) { + $rawver = TRUE; + } $myVersion = $cg_sys_version; $alreadynotified = FALSE; - echo "Running version: [$myVersion]\n"; + if($rawver) { + echo "$myVersion"; + } else { + echo "Running version: [$myVersion]\n"; + } if( $action == "checknew" ) { //See if there is a new version @@ -42,7 +50,10 @@ } } if(!$alreadynotified) { - add_admin_log_item("A new version of cartulary is available: [$ghVersion]. You are currently on version: [$myVersion].", "Upgrade Available"); + $upgmessage = "A new version of cartulary is available: [$ghVersion].\n\nYou are currently on version: [$myVersion].\n\n"; + $releasenotes = fetchUrlSafe($cg_sys_master_release_url_prefix."v".$ghVersion."-notes.txt"); + $upgmessage .= $releasenotes; + add_admin_log_item('
'.$upgmessage.'
', "Upgrade Available"); } loggit(3, "New version of cartulary available: [$ghVersion]"); echo "A new version is available: $ghVersion\n"; diff --git a/releases/v0.7.8-apt.sh b/releases/v0.7.8-apt.sh index c3385b19..f4c06be6 100644 --- a/releases/v0.7.8-apt.sh +++ b/releases/v0.7.8-apt.sh @@ -46,4 +46,8 @@ echo " This could take a while since it checks error/dead feeds too. Please wa cd $CARTROOT/aggrivate sudo node ./aggrivate.js checkerror force sudo node ./aggrivate.js checkdead force -suod node ./aggrivate.js force \ No newline at end of file +suod node ./aggrivate.js force + +##: Log the upgrade +CARTVER=`sudo php /opt/cartulary/bin/getversion.php raw` +sudo php /opt/cartulary/bin/admin_notify.php --content="System was upgraded to version: v$CARTVER" --title="System Upgrade"